From 7466319f9eb02f6aed7c267c3a5c06949d92d129 Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Mon, 2 Jun 2025 12:13:35 +0100 Subject: [PATCH] =?UTF-8?q?Support=20passing=20=E2=80=9Cproduction?= =?UTF-8?q?=E2=80=9D=20when=20deploying?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/cli-v3/src/commands/deploy.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/cli-v3/src/commands/deploy.ts b/packages/cli-v3/src/commands/deploy.ts index 49e9f3c871..5c7304eff3 100644 --- a/packages/cli-v3/src/commands/deploy.ts +++ b/packages/cli-v3/src/commands/deploy.ts @@ -43,7 +43,7 @@ import { updateTriggerPackages } from "./update.js"; const DeployCommandOptions = CommonCommandOptions.extend({ dryRun: z.boolean().default(false), skipSyncEnvVars: z.boolean().default(false), - env: z.enum(["prod", "staging", "preview"]), + env: z.enum(["prod", "staging", "preview", "production"]), branch: z.string().optional(), loadImage: z.boolean().default(false), buildPlatform: z.enum(["linux/amd64", "linux/arm64"]).default("linux/amd64"), @@ -201,6 +201,11 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) { } } + //coerce env from production to prod + if (options.env === "production") { + options.env = "prod"; + } + const envVars = resolveLocalEnvVars(options.envFile); if (envVars.TRIGGER_PROJECT_REF) {