title: Get latest git tag using Bamboo
body: <p>I am trying to display the version of our frontend in the footer of our website. I do this using <code>gulp</code>, which uses <code>simple-git</code>.</p>
  
  <p>Check out this snippet:</p>
  
  <pre><code>var git = require('simple-git')();
  
  [...]
  
  return git.tags(function(err, tags) {
      GIT_TAG = tags.latest;
      return gulp.src(path.join(conf.paths.src, '/*.html'))
                 .pipe($.replace('&lt;!-- replaceWith:version --&gt;', 'Frontend v' + GIT_TAG))
                 [... some more stuff ...]
  });
  </code></pre>
  
  <p>This seems to work perfectly in my development environment: it gets all the tags and returns the latest tag (2.6.5 for example). However, whenever Bamboo checks out the repository, it gives me an empty array and thus, <code>tags.latest</code> returns nothing.</p>
  
  <p>I have tried setting Bamboo to checkout the whole repository instead of the specific branch, but the same thing happens.</p>
  
  <p>Any ideas? If you need more information, I'm happy to give it!</p>