version-bump-prompt
Advanced tools
Comparing version 1.5.2 to 1.6.2
@@ -21,3 +21,3 @@ #!/usr/bin/env node | ||
.option('--preid <name>', 'The identifier for prerelease versions (default is "beta")') | ||
.option('--commit', 'Commit changed files to Git') | ||
.option('--commit [message]', 'Commit changed files to Git (default is "release vX.X.X")') | ||
.option('--tag', 'Tag the commit in Git') | ||
@@ -51,2 +51,7 @@ .option('--push', 'Push the Git commit') | ||
if (typeof options.commit === 'string') { | ||
options.commitMessage = options.commit; | ||
options.commit = true; | ||
} | ||
var manifests = api.manifests(); | ||
@@ -143,2 +148,1 @@ bumpManifests(manifests, options) | ||
} | ||
'use strict'; | ||
var semver = require('semver'), | ||
var SemVer = require('semver'), | ||
spawnSync = require('spawn-sync'), | ||
@@ -52,3 +52,3 @@ fs = require('fs'), | ||
var current = new semver(pkg.version || '0.0.0'); | ||
var current = new SemVer(pkg.version || '0.0.0'); | ||
var identifier = options.preid || current.prerelease[0] || 'beta'; | ||
@@ -59,9 +59,9 @@ | ||
current: current.version, | ||
nextMajor: semver.inc(current.version, 'major'), | ||
nextMinor: semver.inc(current.version, 'minor'), | ||
nextPatch: semver.inc(current.version, 'patch'), | ||
nextPreMajor: semver.inc(current.version, 'premajor', identifier), | ||
nextPreMinor: semver.inc(current.version, 'preminor', identifier), | ||
nextPrePatch: semver.inc(current.version, 'prepatch', identifier), | ||
nextPreRelease: semver.inc(current.version, 'prerelease', identifier) | ||
nextMajor: SemVer.inc(current.version, 'major'), | ||
nextMinor: SemVer.inc(current.version, 'minor'), | ||
nextPatch: SemVer.inc(current.version, 'patch'), | ||
nextPreMajor: SemVer.inc(current.version, 'premajor', identifier), | ||
nextPreMinor: SemVer.inc(current.version, 'preminor', identifier), | ||
nextPrePatch: SemVer.inc(current.version, 'prepatch', identifier), | ||
nextPreRelease: SemVer.inc(current.version, 'prerelease', identifier) | ||
}; | ||
@@ -83,3 +83,3 @@ } | ||
oldVersion = pkg.version || '0.0.0'; | ||
var current = new semver(oldVersion); | ||
var current = new SemVer(oldVersion); | ||
current.inc(type, options.preid || current.prerelease[0] || 'beta'); | ||
@@ -152,3 +152,7 @@ newVersion = pkg.version = current.version; | ||
commitArgs = commitArgs.concat(options.all ? '-a' : manifests); | ||
commitArgs = commitArgs.concat(['-m', '"release v' + newVersion + '"']); | ||
var commitMessage = '"release v' + newVersion + '"'; | ||
if (options.commitMessage) { | ||
commitMessage = '"v' + newVersion + ' ' + options.commitMessage + '"'; | ||
} | ||
commitArgs = commitArgs.concat(['-m', commitMessage]); | ||
exec('git', commitArgs); | ||
@@ -155,0 +159,0 @@ console.log(logSymbols.success, 'Git commit'); |
{ | ||
"name": "version-bump-prompt", | ||
"version": "1.5.2", | ||
"version": "1.6.2", | ||
"description": "Automatically (or with prompts) bump your version number, commit changes, tag, and push to Git", | ||
@@ -30,3 +30,3 @@ "keywords": [ | ||
"test": "npm run istanbul", | ||
"upgrade": "ncu --upgradeAll && npm update", | ||
"upgrade": "npm-check -u", | ||
"bump": "bump --prompt --tag --push --all", | ||
@@ -41,12 +41,12 @@ "release": "npm run upgrade && npm run build && npm test && npm run bump && npm publish", | ||
"devDependencies": { | ||
"istanbul": "^0.3.20", | ||
"chai": "^3.2.0", | ||
"coveralls": "^2.11.4", | ||
"mocha": "^2.3.2", | ||
"chai": "^3.2.0", | ||
"istanbul": "^0.4.5", | ||
"jscs": "^3.0.7", | ||
"jshint": "^2.8.0", | ||
"lodash": "^4.15.0", | ||
"mocha": "^3.0.2", | ||
"npm-check": "^5.2.3", | ||
"sinon": "^1.16.1", | ||
"jscs": "^2.1.1", | ||
"jshint": "^2.8.0", | ||
"npm-check-updates": "^2.2.3", | ||
"version-bump-prompt": "^1.5.1", | ||
"lodash": "^3.10.1" | ||
"version-bump-prompt": "^1.5.1" | ||
}, | ||
@@ -58,4 +58,4 @@ "dependencies": { | ||
"es6-promise": "^3.0.2", | ||
"glob": "^5.0.14", | ||
"inquirer": "^0.10.0", | ||
"glob": "^7.0.6", | ||
"inquirer": "^1.1.3", | ||
"log-symbols": "^1.0.2", | ||
@@ -62,0 +62,0 @@ "semver": "^5.0.3", |
# Version-Bump-Prompt | ||
[![Build Status](https://api.travis-ci.org/BigstickCarpet/version-bump-prompt.svg)](https://travis-ci.org/BigstickCarpet/version-bump-prompt) | ||
[![Build Status](https://api.travis-ci.org/BigstickCarpet/version-bump-prompt.svg?branch=master)](https://travis-ci.org/BigstickCarpet/version-bump-prompt) | ||
[![Dependencies](https://david-dm.org/BigstickCarpet/version-bump-prompt.svg)](https://david-dm.org/bigstickcarpet/version-bump-prompt) | ||
@@ -5,0 +5,0 @@ [![npm](http://img.shields.io/npm/v/version-bump-prompt.svg)](https://www.npmjs.com/package/version-bump-prompt) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16398
305
+ Addedcli-width@2.2.1(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedexternal-editor@1.1.1(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedinquirer@1.2.3(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedmute-stream@0.0.6(transitive)
+ Addedos-tmpdir@1.0.2(transitive)
+ Addedpinkie@2.0.4(transitive)
+ Addedpinkie-promise@2.0.1(transitive)
+ Addedrun-async@2.4.1(transitive)
+ Addedrx@4.1.0(transitive)
+ Addedstring-width@1.0.2(transitive)
+ Addedtmp@0.0.29(transitive)
- Removedcli-width@1.1.1(transitive)
- Removedglob@5.0.15(transitive)
- Removedinquirer@0.10.1(transitive)
- Removedlodash@3.10.1(transitive)
- Removedmute-stream@0.0.5(transitive)
- Removedreadline2@1.0.1(transitive)
- Removedrun-async@0.1.0(transitive)
- Removedrx-lite@3.1.2(transitive)
Updatedglob@^7.0.6
Updatedinquirer@^1.1.3