diff options
| author | Vojta Jina | 2014-03-14 15:59:23 -0700 |
|---|---|---|
| committer | Vojta Jina | 2014-03-14 15:59:23 -0700 |
| commit | 2b741dc8b8568bab1a687ac14eefbae126654e97 (patch) | |
| tree | 542f418ce7b44dc1cf4f0d4790ae0c6b2b66fac8 /lib/versions/version-info.js | |
| parent | e888dde3c569ca117380ed63c0d3d7c7ffd7071c (diff) | |
| download | angular.js-2b741dc8b8568bab1a687ac14eefbae126654e97.tar.bz2 | |
chore(scripts): fix the versions script
Diffstat (limited to 'lib/versions/version-info.js')
| -rw-r--r-- | lib/versions/version-info.js | 11 |
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; }; /** |
