Skip to content

Commit a56eb45

Browse files
committed
If repository has no annotated tags then fallback to revision for VERSION
The "git describe" command will fail if there are no annotated tags in your repository. Use "git describe --always" instead which will fallback to the revision in the case where there are no annotated tags
1 parent 96a88a6 commit a56eb45

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function GitRevisionPlugin () {}
44

55
GitRevisionPlugin.prototype.apply = function (compiler) {
66
buildFile(compiler, 'git rev-parse HEAD', 'COMMITHASH')
7-
buildFile(compiler, 'git describe', 'VERSION')
7+
buildFile(compiler, 'git describe --always', 'VERSION')
88
}
99

1010
module.exports = GitRevisionPlugin

0 commit comments

Comments
 (0)