crying
Some checks failed
ci / docker (push) Failing after 35s

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2024-03-27 22:10:33 +01:00
parent bc386b346b
commit 34efacd03b
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD

11
run.ts
View file

@ -1,9 +1,6 @@
#!/usr/bin/env -S deno run --allow-read --allow-write --allow-run --allow-env --allow-sys --no-lock
let temp = getEnv("ENTRY-POINT")
if (temp) {
Deno.env.set("ENTRYPOINT", temp);
}
const env = Deno.env.toObject();
Deno.env.set(
"DENO_DEPLOY_TOKEN",
@ -14,8 +11,6 @@ Deno.env.set(
),
);
const env = Deno.env.toObject();
function getEnv(key: string, required = false, errorMsg?: string) {
key = key.toUpperCase();
if (env[key]) return env[key];
@ -30,7 +25,7 @@ function getEnv(key: string, required = false, errorMsg?: string) {
return "";
}
temp = getEnv("PROJECT", true, "An project is required");
let temp = getEnv("PROJECT", true, "An project is required");
const flags = [`-p=${temp}`];
temp = getEnv("EXCLUDE");
@ -66,7 +61,7 @@ const command = new Deno.Command("deployctl", {
args: [
"deploy",
...flags,
getEnv("ENTRYPOINT", true, "An entrypoint is required!!"),
getEnv("ENTRY-POINT") || getEnv("ENTRYPOINT", true, "An entrypoint is required!!"),
],
stdout: "piped",
stderr: "piped",