File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import * as commander from "commander" ;
1+ import { program } from "commander" ;
22import * as fs from "fs" ;
33import fetch from "node-fetch" ;
44import * as path from "path" ;
@@ -223,7 +223,7 @@ function run(options: ThirdPartyNoticeOptions = {}) {
223223 } ) ;
224224}
225225
226- const options = commander
226+ const options = program
227227 . option ( "-c, --check" , "Check the current third party notice file is valid." )
228228 . parse ( process . argv ) ;
229229
Original file line number Diff line number Diff line change @@ -110,12 +110,11 @@ async function bumpVersion(version) {
110110 const nextVersion = calcNextVersion ( version ) ;
111111 const bumpBranch = `release/bump-${ nextVersion } ` ;
112112 await gotoMainBranch ( ) ;
113- await run ( `git branch --set-upstream-to=origin/${ bumpBranch } ${ bumpBranch } ` ) ;
114113 await switchToNewBranch ( bumpBranch ) ;
115114 await run ( `npm version --no-git-tag-version --allow-same-version ${ nextVersion } ` ) ;
116115
117116 await run ( `git commit -am "Bump version to ${ nextVersion } "` ) ;
118- await run ( `git push origin ${ bumpBranch } ` ) ;
117+ await run ( `git push --set-upstream origin ${ bumpBranch } ` ) ;
119118 await run ( `git checkout "${ currentBranch } "` ) ;
120119 success ( `Updated version in package.json to ${ nextVersion } (branch: ${ bumpBranch } )` ) ;
121120}
You can’t perform that action at this time.
0 commit comments