fix(docker): copy postinstall helper imports · openclaw/openclaw@aa84b73
steipete
·
2026-04-29
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -74,6 +74,20 @@ describe("Dockerfile", () => {
|
74 | 74 | ); |
75 | 75 | }); |
76 | 76 | |
| 77 | +it("copies postinstall helper imports before pnpm install", async () => { |
| 78 | +const dockerfile = await readFile(dockerfilePath, "utf8"); |
| 79 | +const installIndex = dockerfile.indexOf("pnpm install --frozen-lockfile"); |
| 80 | +const postinstallIndex = dockerfile.indexOf("COPY scripts/postinstall-bundled-plugins.mjs"); |
| 81 | +const distImportHelperIndex = dockerfile.indexOf( |
| 82 | +"COPY scripts/lib/package-dist-imports.mjs ./scripts/lib/package-dist-imports.mjs", |
| 83 | +); |
| 84 | + |
| 85 | +expect(postinstallIndex).toBeGreaterThan(-1); |
| 86 | +expect(distImportHelperIndex).toBeGreaterThan(-1); |
| 87 | +expect(postinstallIndex).toBeLessThan(installIndex); |
| 88 | +expect(distImportHelperIndex).toBeLessThan(installIndex); |
| 89 | +}); |
| 90 | + |
77 | 91 | it("prunes runtime dependencies after the build stage", async () => { |
78 | 92 | const dockerfile = await readFile(dockerfilePath, "utf8"); |
79 | 93 | expect(dockerfile).toContain("FROM build AS runtime-assets"); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。