Created
May 21, 2015 18:15
-
-
Save victorjspinto/1a13317aaae23fd32d06 to your computer and use it in GitHub Desktop.
Write git hash revision on file with grunt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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