Skip to content

Commit 164a178

Browse files
committed
Add hint about deployment promotion
1 parent 91ab549 commit 164a178

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

packages/cli-v3/src/commands/deploy.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,9 +453,9 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) {
453453
const $spinner = spinner({ plain: options.plain });
454454

455455
const buildSuffix =
456-
isLocalBuild && !process.env.TRIGGER_LOCAL_BUILD_LABEL_DISABLED ? " (local)" : "";
456+
isLocalBuild && process.env.TRIGGER_LOCAL_BUILD_LABEL_DISABLED !== "1" ? " (local)" : "";
457457
const deploySuffix =
458-
isLocalBuild && !process.env.TRIGGER_LOCAL_BUILD_LABEL_DISABLED ? " (local build)" : "";
458+
isLocalBuild && process.env.TRIGGER_LOCAL_BUILD_LABEL_DISABLED !== "1" ? " (local build)" : "";
459459

460460
if (options.plain) {
461461
$spinner.start(`Building version ${version}${buildSuffix}`);
@@ -516,7 +516,8 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) {
516516

517517
const warnings = checkLogsForWarnings(buildResult.logs);
518518

519-
const canShowLocalBuildHint = !isLocalBuild && !process.env.TRIGGER_LOCAL_BUILD_HINT_DISABLED;
519+
const canShowLocalBuildHint =
520+
!isLocalBuild && process.env.TRIGGER_LOCAL_BUILD_HINT_DISABLED !== "1";
520521
const buildFailed = !warnings.ok || !buildResult.ok;
521522

522523
if (buildFailed && canShowLocalBuildHint) {
@@ -651,7 +652,7 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) {
651652
`Version ${version} deployed with ${taskCount} detected task${taskCount === 1 ? "" : "s"}`
652653
);
653654

654-
if (!process.env.TRIGGER_DEPLOYMENT_LINK_OUTPUT_DISABLED) {
655+
if (process.env.TRIGGER_DEPLOYMENT_LINK_OUTPUT_DISABLED !== "1") {
655656
console.log(`Deployment: ${rawDeploymentLink}`);
656657
console.log(`Test: ${rawTestLink}`);
657658
}
@@ -1179,6 +1180,12 @@ async function handleNativeBuildServerDeploy({
11791180
log.success(finalDeploymentEvent.message);
11801181
}
11811182

1183+
if (options.skipPromotion) {
1184+
log.info(
1185+
`This deployment was not automatically promoted. You can promote in the dashboard or via the promote command, e.g, \`npx trigger.dev promote ${deployment.version}\`.`
1186+
);
1187+
}
1188+
11821189
if (!isLinksSupported) {
11831190
log.info(`Test tasks: ${rawTestLink}`);
11841191
}

0 commit comments

Comments
 (0)