-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7275b6b
commit ba2d3e5
Showing
3 changed files
with
1,516 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env node | ||
// --------------------------------------------------------------------------------------------------------------------- | ||
// This script is intended to automate the versioning and changelog generation process for a release. | ||
// --------------------------------------------------------------------------------------------------------------------- | ||
|
||
const shipit = require('@postman/shipit'), | ||
|
||
// npm run release [true] [beta] | ||
[pushToOrigin, preReleaseSuffix] = process.argv.splice(2); | ||
|
||
// only support `beta` suffix | ||
if (preReleaseSuffix && preReleaseSuffix !== 'beta') { | ||
throw new Error(`Can't prerelease with \`${preReleaseSuffix}\` suffix.`); | ||
} | ||
|
||
// 🚢 Just Ship It! | ||
shipit({ | ||
mainBranch: 'main', | ||
// don't push to origin unless explicitly set | ||
pushToOrigin: pushToOrigin === 'true', | ||
// prerelease suffix, if any | ||
preReleaseSuffix: preReleaseSuffix, | ||
// make sure that following dependencies are up to date | ||
dependencyList: [] | ||
}).then((version) => { | ||
console.info('🚀', version); | ||
}).catch((err) => { | ||
console.error('🔥', err); | ||
process.exit(1); | ||
}); |
Oops, something went wrong.