Skip to content

Commit

Permalink
Merge pull request #10 from sgtpepper43/master
Browse files Browse the repository at this point in the history
Upgrade node-semver
  • Loading branch information
leny committed Jul 17, 2014
2 parents 11664ea + 1290131 commit 2f8d4b8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ Available release types are:

- **major**: Will bump the major `x.0.0` part of a version string.
- **minor**: Will bump the minor `0.x.0` part of a version string.
- **patch**: Will bump the patch `0.0.x` part of a version string.
- **prerelease**: Will bump the prerelease `0.0.0-x` part of a version string.
- **patch**: Will bump the patch `0.0.x` part of a version string. If a prerelease exists, will only remove the prerelease number.
- **premajor**: Will bump the major `x.0.0` part of a version strring and append a prerelease version of 0 `0.0.0-x'`
- **preminor**: Will bump the minor `0.x.x` part of a version strring and append a prerelease version of 0 `0.0.0-x'`
- **prepatch**: Will bump the patch `0.0.x` part of a version strring and append a prerelease version of 0 `0.0.0-x'`
- **prerelease**: Will bump the prerelease `0.0.0-x` part of a version string. If no prerelease exists, will also bump the patch `0.0.x`
- **build**: Tells bumpup that you are changing only the buildmeta suffix and nothing else should be modified.

Full possible version format: `major.minor.patch-prerelease+buildmeta`
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "grunt-bumpup",
"description": "Update the version, date, and other properties in JSON files while preserving the original indentation style.",
"version": "0.5.2",
"version": "0.6.0",
"keywords": [
"gruntplugin",
"bump",
Expand Down Expand Up @@ -41,7 +41,7 @@
},
"dependencies": {
"moment": "~2.2.1",
"semver": "~2.1.0"
"semver": "~2.3.0"
},
"devDependencies": {
"grunt-contrib-jshint": "~0.6.4",
Expand Down
2 changes: 1 addition & 1 deletion tasks/bumpup.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = function(grunt) {
// Normalize the release type
if (typeof releaseType === 'string') {
releaseType = releaseType.toLowerCase();
if (!/^(major|minor|patch|prerelease|build)$/i.test(releaseType) && !semver.valid(releaseType)) {
if (!/^(major|minor|patch|prerelease|premajor|preminor|prepatch|build)$/i.test(releaseType) && !semver.valid(releaseType)) {
failed(null, '"' + releaseType + '" is not a valid release type, or a semantic version.');
return;
}
Expand Down

0 comments on commit 2f8d4b8

Please sign in to comment.