aboutsummaryrefslogtreecommitdiffstats
path: root/lib/grunt/utils.js
diff options
context:
space:
mode:
authorMatias Niemelä2013-06-13 22:37:13 -0400
committerMisko Hevery2013-06-17 22:17:44 -0700
commit46dfb92afd185c93f60ca90a72653f33d7cb18e8 (patch)
tree51862e5793866ffbb34c16e5053376af5932e2c6 /lib/grunt/utils.js
parentef22968810d555f78d3bbf7b5428757690c8cc70 (diff)
downloadangular.js-46dfb92afd185c93f60ca90a72653f33d7cb18e8.tar.bz2
feat(ngdocs): provide support for user to jump between different versions of the angularjs documentation
Diffstat (limited to 'lib/grunt/utils.js')
-rw-r--r--lib/grunt/utils.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/grunt/utils.js b/lib/grunt/utils.js
index 3d2ab316..38533f27 100644
--- a/lib/grunt/utils.js
+++ b/lib/grunt/utils.js
@@ -16,8 +16,11 @@ module.exports = {
var semver = match[1].split('.');
var hash = shell.exec('git rev-parse --short HEAD', {silent: true}).output.replace('\n', '');
+ var fullVersion = (match[1] + (match[2] ? '-' + hash : ''));
+ var numVersion = semver[0] + '.' + semver[1] + '.' + semver[2];
var version = {
- full: (match[1] + (match[2] ? '-' + hash : '')),
+ number: numVersion,
+ full: fullVersion,
major: semver[0],
minor: semver[1],
dot: semver[2],