Skip to content

Commit 32a17c0

Browse files
mdesmetclaude
andcommitted
fix: archive step matched 'win32' but key uses 'windows'
The `name` builder at build.ts:283 substitutes `win32 → windows` when constructing the per-target directory name, so the keys in the `binaries` map (e.g. `@altimateai/altimate-code-windows-x64`) never contain the literal substring `win32`. The archive step at line 461 was using `key.includes("win32")` to pick `altimate.exe` vs `altimate`, which evaluated false on every Windows target and caused the zip step to look for a non-existent `altimate` file on Windows. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
1 parent 0e83773 commit 32a17c0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎packages/opencode/script/build.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,10 @@ if (Script.release) {
458458
// binary named `altimate` — matching the primary npm bin entry.
459459
const archiveName = key.replace(/^@altimateai\/altimate-code-/, "altimate-")
460460
const archivePath = path.resolve("dist", archiveName)
461-
const binaryName = key.includes("win32") ? "altimate.exe" : "altimate"
461+
// Name construction at line 283 substitutes `win32 → windows`, so the key
462+
// contains "windows", not "win32". Matching the wrong substring here would
463+
// archive a non-existent `altimate` file on Windows targets.
464+
const binaryName = key.includes("windows") ? "altimate.exe" : "altimate"
462465
if (key.includes("linux")) {
463466
await $`tar -czf ${archivePath}.tar.gz ${binaryName}`.cwd(`dist/${key}/bin`)
464467
} else {

0 commit comments

Comments
 (0)