Skip to content

Commit

Permalink
feat(bootstrap): accept explicit semver (such as --bump=1.17.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Mar 2, 2020
1 parent 57899fd commit b3da002
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/deployment/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,17 @@ show-config display the client connection parameters
break;

default:
throw Error(
`${versionKind} is not one of "major", "minor", or "revision"`,
);
if (!versionKind.match(/^[1-9]/)) {
throw Error(
`${versionKind} is not one of "major", "minor", "revision", or 1.2.3`,
);
}
}

const vstr = `${major}.${minor}.${revision}${tag}`;
let vstr = `${major}.${minor}.${revision}${tag}`;
if (versionKind.match(/^[1-9]/)) {
vstr = versionKind;
}
console.log(vstr);
await createFile(versionFile, vstr);
break;
Expand Down

0 comments on commit b3da002

Please sign in to comment.