Skip to content

Commit

Permalink
fix: git bump now prepatchs correctly
Browse files Browse the repository at this point in the history
Fix #129
  • Loading branch information
eddiemonge committed Feb 18, 2015
1 parent 2fe1e89 commit a2e06c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tasks/bump.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ module.exports = function(grunt) {
grunt.file.expand(opts.files).forEach(function(file, idx) {
var version = null;
var content = grunt.file.read(file).replace(VERSION_REGEXP, function(match, prefix, parsedVersion, namedPre, noNamePre, suffix) {
version = exactVersionToSet || gitVersion || semver.inc(parsedVersion, versionType || 'patch', opts.prereleaseName);
var type = versionType === 'git' ? 'prerelease' : versionType;
version = exactVersionToSet || semver.inc(
parsedVersion, type || 'patch', gitVersion || opts.prereleaseName
);
return prefix + version + suffix;
});

Expand Down

1 comment on commit a2e06c1

@adambiggs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bump:git is still broken after this commit... 😭

See my previous comment about the originally intended functionality.

bump:git now sets versions like 1.0.26-1.0.25-1-g47ef0-d.0... It should simply set the version to whatever the $ git describe command returns (i.e. 1.0.25-1-g47ef0-d).

Please sign in to comment.