This commit is contained in:
Frank 2025-07-16 16:12:31 +08:00
parent 7ac0a2bc65
commit b79167ce66

View file

@ -1,12 +1,12 @@
#!/usr/bin/env bun #!/usr/bin/env bun
import { $ } from "bun" import { $, ShellError } from "bun"
try { try {
await $`git tag -d github-v1` await $`git tag -d github-v1`
await $`git push origin :refs/tags/github-v1` await $`git push origin :refs/tags/github-v1`
} catch (e) { } catch (e) {
if (e instanceof Error && e.message.includes("not found")) { if (e instanceof ShellError && e.stderr.toString().match(/tag \S+ not found/)) {
console.log("tag not found, continuing...") console.log("tag not found, continuing...")
} else { } else {
throw e throw e