Skip to content

Commit

Permalink
feat: output commit hash. closes #3429
Browse files Browse the repository at this point in the history
  • Loading branch information
jpoon committed Jan 31, 2019
1 parent b589cb0 commit 6aaef99
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,13 @@ gulp.task('forceprettier', function(done) {
runPrettier('git ls-files', done);
});

gulp.task('commit-hash', function(done) {
git.revParse({ args: 'HEAD', quiet: true }, function(err, hash) {
require('fs').writeFileSync('out/version', hash);
done();
});
});

// test
gulp.task('test', function(done) {
// the flag --grep takes js regex as a string and filters by test and test suite names
Expand Down Expand Up @@ -224,7 +231,7 @@ gulp.task('test', function(done) {
});
});

gulp.task('build', gulp.series('prettier', gulp.parallel('tsc', 'tslint')));
gulp.task('build', gulp.series('prettier', gulp.parallel('tsc', 'tslint', 'commit-hash')));
gulp.task('changelog', gulp.series(validateArgs, createChangelog));
gulp.task(
'release',
Expand Down

0 comments on commit 6aaef99

Please sign in to comment.