Skip to content

Instantly share code, notes, and snippets.

@victorjspinto
Created May 21, 2015 18:15
Show Gist options
  • Save victorjspinto/1a13317aaae23fd32d06 to your computer and use it in GitHub Desktop.
Save victorjspinto/1a13317aaae23fd32d06 to your computer and use it in GitHub Desktop.
Write git hash revision on file with grunt
grunt.registerTask('tag-revision', 'Tag the current build revision', function () {
grunt.task.requires('git-describe');
grunt.file.write('public/version.json', JSON.stringify({
version: grunt.config('pkg.version'),
revision: grunt.config('meta.revision'),
date: grunt.template.today()
}));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment