aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVojta Jina2014-03-14 15:59:23 -0700
committerVojta Jina2014-03-14 15:59:23 -0700
commit2b741dc8b8568bab1a687ac14eefbae126654e97 (patch)
tree542f418ce7b44dc1cf4f0d4790ae0c6b2b66fac8
parente888dde3c569ca117380ed63c0d3d7c7ffd7071c (diff)
downloadangular.js-2b741dc8b8568bab1a687ac14eefbae126654e97.tar.bz2
chore(scripts): fix the versions script
-rw-r--r--lib/versions/version-info.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/versions/version-info.js b/lib/versions/version-info.js
index 5bf06585..5689e946 100644
--- a/lib/versions/version-info.js
+++ b/lib/versions/version-info.js
@@ -74,16 +74,17 @@ var getTaggedVersion = function() {
var gitTagResult = shell.exec('git describe --exact-match', {silent:true});
if ( gitTagResult.code === 0 ) {
- var tag = gitTagResult.output;
+ var tag = gitTagResult.output.trim();
var version = semver.parse(tag);
- if ( version ) {
- if ( version.satisfies(currentPackage.branchVersion) ) {
- version.codeName = getCodeName(tag);
- }
+
+ if ( version && semver.satisfies(version, currentPackage.branchVersion)) {
+ version.codeName = getCodeName(tag);
version.full = version.version + '+' + version.build;
return version;
}
}
+
+ return null;
};
/**