Skip to content

Commit be69de3

Browse files
committed
Drop the force from --force-local-build
*It is cleaner that way*
1 parent f0cd177 commit be69de3

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ const DeployCommandOptions = CommonCommandOptions.extend({
7474
envFile: z.string().optional(),
7575
// Local build options
7676
forceLocalBuild: z.boolean().optional(),
77+
localBuild: z.boolean().optional(),
7778
useRegistryCache: z.boolean().default(false),
7879
network: z.enum(["default", "none", "host"]).optional(),
7980
push: z.boolean().optional(),
@@ -156,7 +157,12 @@ export function configureDeployCommand(program: Command) {
156157
).hideHelp()
157158
)
158159
// Local build options
159-
.addOption(new CommandOption("--force-local-build", "Force a local build of the image"))
160+
.addOption(
161+
new CommandOption("--force-local-build", "Deprecated alias for --local-build").implies({
162+
localBuild: true,
163+
})
164+
)
165+
.addOption(new CommandOption("--local-build", "Build the deployment image locally"))
160166
.addOption(new CommandOption("--push", "Push the image after local builds").hideHelp())
161167
.addOption(
162168
new CommandOption("--no-push", "Do not push the image after local builds").hideHelp()
@@ -379,9 +385,9 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) {
379385
},
380386
envVars.TRIGGER_EXISTING_DEPLOYMENT_ID
381387
);
382-
const isLocalBuild = options.forceLocalBuild || !deployment.externalBuildData;
388+
const isLocalBuild = options.localBuild || !deployment.externalBuildData;
383389
// Would be best to actually store this separately in the deployment object. This is an okay proxy for now.
384-
const remoteBuildExplicitlySkipped = options.forceLocalBuild && !!deployment.externalBuildData;
390+
const remoteBuildExplicitlySkipped = options.localBuild && !!deployment.externalBuildData;
385391

386392
// Fail fast if we know local builds will fail
387393
if (isLocalBuild) {

0 commit comments

Comments
 (0)