Add usage info to version script

This commit is contained in:
Max Brunsfeld 2019-02-06 11:56:12 -08:00
parent 4badd7cc40
commit 6d6e29f2dc

View file

@ -20,7 +20,20 @@ if (npmVersion !== cargoVersion) {
process.exit(1);
}
if (process.argv[2]) {
const arg = process.argv[2];
if (!arg) {
console.log([
`Usage: script/version major |minor | patch | <version-number>`,
'',
'Update the CLI version by the given increment or to the given',
'version number, creating a commit and tag for the new version.',
''
].join('\n'))
process.exit(1);
}
if (arg) {
// Check that working directory is clean
const diff = execFileSync(
'git',