Skip to content

Commit

Permalink
[BUGFIX release] use calcualteVersion in yuidoc
Browse files Browse the repository at this point in the history
do not prefix globals versions with v

(cherry picked from commit 44e3c70)
  • Loading branch information
bmac committed Jan 12, 2016
1 parent 58dabce commit 6388c85
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions lib/calculate-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ module.exports = function() {

if (existsSync(gitPath)) {
var info = gitRepoInfo(gitPath);
if (info.tag) {
return info.tag;
}

return packageVersion + '+' + info.sha.slice(0, 10);
} else {
Expand Down
3 changes: 2 additions & 1 deletion lib/version-replace.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
var calculateVersion = require('./calculate-version');
var version = calculateVersion().replace(/^v/, '');
var replace = require('broccoli-string-replace');

module.exports = function configFiles(tree) {
return replace(tree, {
files: ['*.{json,js}'],
pattern: {
match: /VERSION_STRING_PLACEHOLDER/g,
replacement: calculateVersion()
replacement: version
}
});
};
4 changes: 2 additions & 2 deletions lib/yuidoc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var YUIDoc = require('broccoli-yuidoc');
var version = require('git-repo-version')(10);
var calculateVersion = require('./calculate-version');
var path = require('path');

module.exports = function yui() {
Expand All @@ -12,7 +12,7 @@ module.exports = function yui() {
yuidoc: {
"name": "The ember-data API",
"description": "The ember-data API: a data persistence library for Ember.js",
"version": version,
"version": calculateVersion(),
"logo": "http://f.cl.ly/items/1A1L432s022u1O1q1V3p/ember%20logo.png",
"url": "https://github.com/emberjs/data",
"options": {
Expand Down

0 comments on commit 6388c85

Please sign in to comment.