fix(deploy): write Lambda zips to an absolute output path (PLAT-79) (#110)
Some checks are pending
Deploy / Deploy to prod (push) Waiting to run

This commit is contained in:
Adam Moussa 2026-09-16 18:38:05 +00:00 • committed by GitHub
parent 0e3e95c240
commit 3e781c5cd9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,7 +8,7 @@
import { spawn, spawnSync } from "node:child_process";
import { cpSync, existsSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { join, resolve } from "node:path";
import { fileURLToPath } from "node:url";
const ROOT = fileURLToPath(new URL("..", import.meta.url));
@ -28,7 +28,7 @@ function parseArgs(argv) {
if (arg === "--git-sha") {
out.gitSha = argv[++i];
} else if (arg === "--out-dir") {
out.outDir = argv[++i];
out.outDir = resolve(argv[++i]);
} else if (arg === "--only") {
out.only.push(argv[++i]);
} else {
@ -69,7 +69,7 @@ async function build(name, gitSha, outDir) {
throw new Error("npm ci --omit=dev failed");
}
mkdirSync(outDir, { recursive: true });
const zipPath = join(outDir, `${name}.zip`);
const zipPath = resolve(outDir, `${name}.zip`);
rmSync(zipPath, { force: true });
await zipDir(dest, zipPath);
return zipPath;