Skip to content

Commit

Permalink
Merge pull request #1755 from dancrumb/feature/1754
Browse files Browse the repository at this point in the history
Fixes #1754: The version command in the programmatic API now returns the new version
  • Loading branch information
sheerun committed Mar 27, 2015
2 parents 4d59d26 + a1ecf8a commit b4aa90b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/commands/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function bump(project, versionArg, message) {
})
.then(function () {
console.log('v' + newVersion);
return newVersion;
});
}

Expand Down
8 changes: 8 additions & 0 deletions test/commands/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ describe('bower list', function () {
});
});

it('returns the new version', function() {
package.prepare();

return helpers.run(version, ['major', {}, { cwd: package.path }]).then(function(results) {
expect(results[0]).to.be('1.0.0');
});
});

it('bumps patch version, create commit, and tag', function() {
return gitPackage.prepareGit().then(function() {

Expand Down

0 comments on commit b4aa90b

Please sign in to comment.