graceful exit on existing tag

This commit is contained in:
Emmaline Autumn 2025-05-07 09:57:04 -06:00
parent 0150417224
commit bd8daaf54a

View File

@ -35,8 +35,12 @@ try {
console.log(`Tag ${tag} already exists.`);
created = false;
} catch {
try {
await run("git", ["tag", tag]);
await run("git", ["push", "origin", tag]);
} catch {
created = false;
}
}
if (created) {
const out = Deno.env.get("GITHUB_OUTPUT");
@ -54,6 +58,7 @@ if (created) {
} else {
console.error("GITHUB_OUTPUT not set.");
}
Deno.exit(0);
}
async function run(cmd: string, args: string[]) {