graceful exit on existing tag
This commit is contained in:
parent
0150417224
commit
bd8daaf54a
@ -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[]) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user