Skip to content

Commit

Permalink
Merge pull request eclipse-zenoh#207 from ZettaScaleLabs/fix-tag-delete
Browse files Browse the repository at this point in the history
fix: don't delete tag while removing branches
  • Loading branch information
Mallets authored Aug 8, 2024
2 parents 808cfed + 146a30d commit 6feb63a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions dist/create-release-branch-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24881,10 +24881,7 @@ async function main(input) {
if (branches.length >= input.dryRunHistorySize) {
const toDelete = branches.slice(0, branches.length - input.dryRunHistorySize);
toDelete.forEach(branch => {
const tag = branch.replace("release/dry-run/", "");
command_sh(`git push origin --delete ${branch}`, { cwd: repo });
// Don't fail the entire workflow if the tag delete fails
command_sh(`git push origin --delete ${tag}`, { cwd: repo, check: false });
});
}
}
Expand Down
3 changes: 0 additions & 3 deletions src/create-release-branch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ export async function main(input: Input) {
if (branches.length >= input.dryRunHistorySize) {
const toDelete = branches.slice(0, branches.length - input.dryRunHistorySize);
toDelete.forEach(branch => {
const tag = branch.replace("release/dry-run/", "");
sh(`git push origin --delete ${branch}`, { cwd: repo });
// Don't fail the entire workflow if the tag delete fails
sh(`git push origin --delete ${tag}`, { cwd: repo, check: false });
});
}
}
Expand Down

0 comments on commit 6feb63a

Please sign in to comment.