chore: always try to nuke tags (#16451)
This commit is contained in:
parent
7f4064af16
commit
3417c42bfd
1 changed files with 9 additions and 3 deletions
|
@ -84,9 +84,13 @@ async function cleanReleaseArtifacts () {
|
||||||
const releaseId = args.releaseID.length > 0 ? args.releaseID : null
|
const releaseId = args.releaseID.length > 0 ? args.releaseID : null
|
||||||
const isNightly = args.tag.includes('nightly')
|
const isNightly = args.tag.includes('nightly')
|
||||||
|
|
||||||
|
// try to revert commit regardless of tag and draft deletion status
|
||||||
|
await revertBumpCommit(args.tag)
|
||||||
|
|
||||||
if (releaseId) {
|
if (releaseId) {
|
||||||
if (isNightly) {
|
if (isNightly) {
|
||||||
const deletedNightlyDraft = await deleteDraft(releaseId, 'nightlies')
|
const deletedNightlyDraft = await deleteDraft(releaseId, 'nightlies')
|
||||||
|
|
||||||
// don't delete tag unless draft deleted successfully
|
// don't delete tag unless draft deleted successfully
|
||||||
if (deletedNightlyDraft) {
|
if (deletedNightlyDraft) {
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
|
@ -101,11 +105,13 @@ async function cleanReleaseArtifacts () {
|
||||||
await deleteTag(args.tag, 'electron')
|
await deleteTag(args.tag, 'electron')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
await Promise.all([
|
||||||
|
deleteTag(args.tag, 'electron'),
|
||||||
|
deleteTag(args.tag, 'nightlies')
|
||||||
|
])
|
||||||
}
|
}
|
||||||
|
|
||||||
// try to revert commit regardless of tag and draft deletion status
|
|
||||||
await revertBumpCommit(args.tag)
|
|
||||||
|
|
||||||
console.log(`${pass} failed release artifact cleanup complete`)
|
console.log(`${pass} failed release artifact cleanup complete`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue