Support passing “production” when deploying (#2137)

This commit is contained in:
Matt Aitken
2025-06-02 14:18:36 +01:00
committed by GitHub
parent 84d8fb575f
commit 26b0523cd0
+6 -1
View File
@@ -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) {