File tree Expand file tree Collapse file tree 3 files changed +1516
-3
lines changed Expand file tree Collapse file tree 3 files changed +1516
-3
lines changed Original file line number Diff line number Diff line change 1+ #!/usr/bin/env node
2+ // ---------------------------------------------------------------------------------------------------------------------
3+ // This script is intended to automate the versioning and changelog generation process for a release.
4+ // ---------------------------------------------------------------------------------------------------------------------
5+
6+ const shipit = require ( '@postman/shipit' ) ,
7+
8+ // npm run release [true] [beta]
9+ [ pushToOrigin , preReleaseSuffix ] = process . argv . splice ( 2 ) ;
10+
11+ // only support `beta` suffix
12+ if ( preReleaseSuffix && preReleaseSuffix !== 'beta' ) {
13+ throw new Error ( `Can't prerelease with \`${ preReleaseSuffix } \` suffix.` ) ;
14+ }
15+
16+ // 🚢 Just Ship It!
17+ shipit ( {
18+ mainBranch : 'main' ,
19+ // don't push to origin unless explicitly set
20+ pushToOrigin : pushToOrigin === 'true' ,
21+ // prerelease suffix, if any
22+ preReleaseSuffix : preReleaseSuffix ,
23+ // make sure that following dependencies are up to date
24+ dependencyList : [ ]
25+ } ) . then ( ( version ) => {
26+ console . info ( '🚀' , version ) ;
27+ } ) . catch ( ( err ) => {
28+ console . error ( '🔥' , err ) ;
29+ process . exit ( 1 ) ;
30+ } ) ;
You can’t perform that action at this time.
0 commit comments