mirror of
https://github.com/Sea-Haven-Industries/payments-dashboard.git
synced 2026-09-30 03:03:13 +00:00
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
Some checks are pending
Deploy / Deploy to prod (push) Waiting to run
This commit is contained in:
parent
0e3e95c240
commit
3e781c5cd9
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue