From cac7ddbad480c1c31e36297f6e0fbe314b9d7b71 Mon Sep 17 00:00:00 2001 From: Emanuele <107957269+emanuelefaja@users.noreply.github.com> Date: Wed, 25 Mar 2026 21:12:47 +0700 Subject: [PATCH] Add --no-cache flag to deploy command Passes `noCache: true` in the deployment request body when the user specifies `--no-cache`, allowing Docker builds without cache on the daemon side. --- src/commands/deploy.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/commands/deploy.ts b/src/commands/deploy.ts index 91d36ed..eaa8b15 100644 --- a/src/commands/deploy.ts +++ b/src/commands/deploy.ts @@ -7,6 +7,7 @@ import {request, readEventSource} from '../auth-request.js' interface DeployRequest { commit?: string discoFile?: string + noCache?: boolean } export interface DeployResponse { @@ -29,6 +30,7 @@ export default class Deploy extends Command { // TODO file seems to not work right now - re-test once daemon is fixed? file: Flags.string({required: false}), disco: Flags.string({required: false}), + 'no-cache': Flags.boolean({required: false, default: false, description: 'Build without using Docker cache'}), } public async run(): Promise { @@ -46,6 +48,10 @@ export default class Deploy extends Command { reqBody.discoFile = discoFile } + if (flags['no-cache']) { + reqBody.noCache = true + } + const res = await request({method: 'POST', url, body: reqBody, discoConfig, expectedStatuses: [201]}) const data = (await res.json()) as DeployResponse