Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 1517d6d

Browse files
vojtajinatbosch
authored andcommitted
chore(scripts): fix the versions script
1 parent 6bb17af commit 1517d6d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/versions/version-info.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,17 @@ var getTaggedVersion = function() {
7474
var gitTagResult = shell.exec('git describe --exact-match', {silent:true});
7575

7676
if ( gitTagResult.code === 0 ) {
77-
var tag = gitTagResult.output;
77+
var tag = gitTagResult.output.trim();
7878
var version = semver.parse(tag);
79-
if ( version ) {
80-
if ( version.satisfies(currentPackage.branchVersion) ) {
81-
version.codeName = getCodeName(tag);
82-
}
79+
80+
if ( version && semver.satisfies(version, currentPackage.branchVersion)) {
81+
version.codeName = getCodeName(tag);
8382
version.full = version.version + '+' + version.build;
8483
return version;
8584
}
8685
}
86+
87+
return null;
8788
};
8889

8990
/**

0 commit comments

Comments
 (0)