From bd7af1241ee4369cffe87dc36812c9bcb70605fd Mon Sep 17 00:00:00 2001 From: Seth Trowbridge Date: Sun, 30 Jul 2023 14:21:35 -0400 Subject: [PATCH] allow for production deployment --- run-deploy.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/run-deploy.tsx b/run-deploy.tsx index d2ab39a..5f9ef7c 100644 --- a/run-deploy.tsx +++ b/run-deploy.tsx @@ -53,6 +53,17 @@ try let useToken = await collect("DENO_DEPLOY_TOKEN", arg, env); let useProject = await collect("DENO_DEPLOY_PROJECT", arg, env); + + let scanProd:string|string[] = await prompt(`Do you want to deploy to *production*? [y/n]`); + if(scanProd == "y") + { + scanProd = await prompt(`This will update the live project at ${useProject} are you sure you want to continue? [y/n]`); + scanProd = scanProd=="y" ? ["--prod"] : []; + } + else + { + scanProd = []; + } const command = new Deno.Command( `deno`, @@ -66,6 +77,7 @@ try `--project=${useProject}`, `--import-map=./deno.json`, `--token=${useToken}`, + ...scanProd, Deno.mainModule ], stdin: "piped",