README
versionz
Uses git
to look at your previous package.json
to determine if there was a version change
var versionz = require('versionz');
versionz(function(err, info) {
if (err) {
console.log(err);
} else if (info.changed) {
console.log('package.json version changed from ' + info.then +
' to ' + info.now + ' last commit');
} else {
console.log('package.json did not change since last commit');
}
});
cli
There is a command-line interface. Run npm install -g versionz
. versionz
runs git commands in the current directory to look at your previous package.json
to determine if there was a version change
$ versionz --help Usage: versionz.js [OPTIONS] [ARGS] Options: -q, --quiet quiet mode -h, --help Display help and usage details $ versionz ERROR: package.json did not change since last commit $ versionz -q && echo true $ cd versionz_test/ && versionz OK: package.json changed from 0.0.7 to 0.0.8 $ versionz -q && echo true true