Skip to content

Commit e145f32

Browse files
committed
Add produceLKG flag to cherry-pick PR script
1 parent 46b7972 commit e145f32

File tree

10 files changed

+21
-11
lines changed

10 files changed

+21
-11
lines changed

scripts/open-cherry-pick-pr.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const userName = process.env.GH_USERNAME;
1111
const reviewers = process.env.REQUESTING_USER ? [process.env.REQUESTING_USER] : ["weswigham", "RyanCavanaugh"];
1212
const branchName = `pick/${process.env.SOURCE_ISSUE}/${process.env.TARGET_BRANCH}`;
1313
const remoteUrl = `https://${process.argv[2]}@github.com/${userName}/TypeScript.git`;
14+
const produceLKG = !!process.env.produceLKG;
1415

1516
async function main() {
1617
if (!process.env.TARGET_BRANCH) {
@@ -52,7 +53,16 @@ ${logText.trim()}`
5253
runSequence([
5354
["git", ["checkout", process.env.TARGET_BRANCH]], // checkout the target branch
5455
["git", ["checkout", "-b", branchName]], // create a new branch
55-
["git", ["cherry-pick", squashSha.trim()]], //
56+
["git", ["cherry-pick", squashSha.trim()]],
57+
]);
58+
if (produceLKG) {
59+
runSequence([
60+
["gulp", ["LKG"]],
61+
["git", ["add", "lib"]],
62+
["git", ["commit", "-m", `"Update LKG"`]]
63+
]);
64+
}
65+
runSequence([
5666
["git", ["remote", "add", "fork", remoteUrl]], // Add the remote fork
5767
["git", ["push", "--set-upstream", "fork", branchName, "-f"]] // push the branch
5868
]);
@@ -71,7 +81,7 @@ ${logText.trim()}`
7181
base: process.env.TARGET_BRANCH,
7282
body:
7383
`This cherry-pick was triggerd by a request on https://github.com/Microsoft/TypeScript/pull/${process.env.SOURCE_ISSUE}
74-
Please review the diff and merge if no changes are unexpected.
84+
Please review the diff and merge if no changes are unexpected.${produceLKG ? ` An LKG update commit is included seperately from the base change.` : ""}
7585
You can view the cherry-pick log [here](https://typescript.visualstudio.com/TypeScript/_build/index?buildId=${process.env.BUILD_BUILDID}&_a=summary).
7686
7787
cc ${reviewers.map(r => "@" + r).join(" ")}`,

tests/cases/user/prettier/prettier

Submodule prettier updated 282 files

tests/cases/user/webpack/webpack

Submodule webpack updated 315 files

0 commit comments

Comments
 (0)