mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: create release branch from FETCH_HEAD (#63731)
When creating the release branch, it should be based on the latest upstream changes to avoid building a release on a stale commit. PR Close #63731
This commit is contained in:
committed by
Jessica Janiuk
parent
cdf5d6763f
commit
eec0bdcbb6
@@ -293,7 +293,7 @@ async function prepareReleasePullRequest(newVersion: string): Promise<void> {
|
||||
console.log(chalk.blue('Creating release commit...'));
|
||||
const releaseBranch = `devtools-release-${newVersion}`;
|
||||
await exec(`git branch -D ${releaseBranch}`).catch(() => {});
|
||||
await exec(`git checkout -b ${releaseBranch}`);
|
||||
await exec(`git checkout -b ${releaseBranch} FETCH_HEAD`);
|
||||
await exec(`git commit -m "${releaseCommitPrefix}${newVersion}" "${manifestPaths.join('" "')}"`);
|
||||
await exec(`git push origin ${releaseBranch} --force-with-lease`);
|
||||
console.log(chalk.green('Release branch pushed to your fork.'));
|
||||
|
||||
Reference in New Issue
Block a user