mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-12 16:10:30 +02:00
ci: Don't error on release candidate cleanup when branch is missing (#27602)
This commit is contained in:
parent
58fbaf4a88
commit
93e2998153
|
|
@ -7,6 +7,7 @@ import {
|
||||||
resolveReleaseTagForTrack,
|
resolveReleaseTagForTrack,
|
||||||
sh,
|
sh,
|
||||||
tagVersionInfoToReleaseCandidateBranchName,
|
tagVersionInfoToReleaseCandidateBranchName,
|
||||||
|
trySh,
|
||||||
writeGithubOutput,
|
writeGithubOutput,
|
||||||
} from './github-helpers.mjs';
|
} from './github-helpers.mjs';
|
||||||
|
|
||||||
|
|
@ -88,12 +89,12 @@ function removeBranch(branch) {
|
||||||
|
|
||||||
console.log(`Removing remote branch ${branch} from origin...`);
|
console.log(`Removing remote branch ${branch} from origin...`);
|
||||||
// Delete remote branch
|
// Delete remote branch
|
||||||
sh('git', ['push', 'origin', '--delete', branch]);
|
trySh('git', ['push', 'origin', '--delete', branch]);
|
||||||
|
|
||||||
// Optional local cleanup (keeps reruns tidy)
|
// Optional local cleanup (keeps reruns tidy)
|
||||||
if (localRefExists(`refs/heads/${branch}`)) {
|
if (localRefExists(`refs/heads/${branch}`)) {
|
||||||
console.log(`Removing local branch ${branch}...`);
|
console.log(`Removing local branch ${branch}...`);
|
||||||
sh('git', ['branch', '-D', branch]);
|
trySh('git', ['branch', '-D', branch]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return branch;
|
return branch;
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ mock.module('./github-helpers.mjs', {
|
||||||
},
|
},
|
||||||
writeGithubOutput: () => {}, // no-op in tests
|
writeGithubOutput: () => {}, // no-op in tests
|
||||||
sh: () => {}, // no-op in tests
|
sh: () => {}, // no-op in tests
|
||||||
|
trySh: () => {}, // no-op in tests
|
||||||
getCommitForRef: () => {}, // no-op in tests
|
getCommitForRef: () => {}, // no-op in tests
|
||||||
remoteBranchExists: () => {}, // no-op in tests
|
remoteBranchExists: () => {}, // no-op in tests
|
||||||
localRefExists: () => {}, // no-op in tests
|
localRefExists: () => {}, // no-op in tests
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user