Skip to content

Commit 6bba389

Browse files
cRui861rechen
andauthored
Fix bump version script (#2479)
Co-authored-by: rechen <rechen@microsoft.com>
1 parent 6c239ce commit 6bba389

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

scripts/lca/generate-third-party.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as commander from "commander";
1+
import { program } from "commander";
22
import * as fs from "fs";
33
import fetch from "node-fetch";
44
import * 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

scripts/publish/publish.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)