Skip to content

Commit

Permalink
changes for pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
schechter committed Feb 12, 2015
1 parent 576d1ca commit 87307e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "grunt-bump",
"description": "Bump package version",
"version": "0.1.1-rc0",
"version": "0.1.1",
"homepage": "https://github.com/vojtajina/grunt-bump",
"author": {
"name": "Vojta Jína",
Expand Down Expand Up @@ -29,8 +29,7 @@
"Gavin <[email protected]>",
"Jarrett Drouillard <[email protected]>",
"Mathias Paumgarten <[email protected]>",
"Mayhem <[email protected]>",
"Mike Schechter <[email protected]>"
"Mayhem <[email protected]>"
],
"repository": {
"type": "git",
Expand All @@ -48,7 +47,7 @@
},
"license": "MIT",
"dependencies": {
"semver": "4.2.2"
"semver": "~4.2.2"
},
"peerDependencies": {
"grunt": ">=0.4.0"
Expand Down
10 changes: 5 additions & 5 deletions tasks/bump.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ module.exports = function(grunt) {
runIf(opts.bumpVersion, function() {
grunt.file.expand(opts.files).forEach(function(file, idx) {
var version = null;
var bumpFrom
var content = grunt.file.read(file).replace(VERSION_REGEXP, function(match, prefix, parsedVersion, preReleaseVersion, notSemver, suffix) {
if(preReleaseVersion !== undefined) {
bumpFrom = parsedVersion+preReleaseVersion
var bumpFrom;
var content = grunt.file.read(file).replace(VERSION_REGEXP, function(match, prefix, parsedVersion, preRelVer, git, suffix) {
if(preRelVer !== undefined) {
bumpFrom = parsedVersion+preRelVer
} else {
bumpFrom = parsedVersion
}
if(versionType === 'release') {
if(preReleaseVersion === undefined) {
if(preRelVer === undefined) {
grunt.warn('Trying to release a non-prerelease version. The current version has been released.')
} else {
version = parsedVersion
Expand Down

0 comments on commit 87307e6

Please sign in to comment.