From 1f660e79b83c0600516a8c71857d2889c215ca55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Thu, 16 Apr 2026 22:55:00 -0400 Subject: [PATCH] build(release-local): derive docker volume name from rootDir hash (P2-22) --- scripts/release-local.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/release-local.mjs b/scripts/release-local.mjs index e385a6ce..cf887536 100644 --- a/scripts/release-local.mjs +++ b/scripts/release-local.mjs @@ -1,4 +1,5 @@ import { spawn } from "node:child_process"; +import { createHash } from "node:crypto"; import { cp, mkdir, rm, writeFile } from "node:fs/promises"; import os from "node:os"; import { dirname, join } from "node:path"; @@ -11,7 +12,8 @@ const rootDir = join(__dirname, ".."); const buildReleaseDir = join(rootDir, "build", "release"); const localReleaseDir = join(rootDir, "local-release"); const pnpmVersion = "10.24.0"; -const dockerNodeModulesVolume = `${process.cwd().split("/").filter(Boolean).at(-1) ?? "agentcompany"}-node-modules`; +const checkoutHash = createHash("sha1").update(rootDir).digest("hex").slice(0, 10); +const dockerNodeModulesVolume = `agentcompany-node-modules-${checkoutHash}`; function parseArgs(argv) { const options = {