fix(opencode): ad-hoc re-sign darwin binaries after local compile (#52183)

Co-authored-by: Ryan Wyler <ryan.wyler@gmail.com>
This commit is contained in:
Ryan
2026-09-30 10:53:09 -07:00
committed by GitHub
parent 97a86b7677
commit 9b4882db54
+6
View File
@@ -201,6 +201,12 @@ for (const item of targets) {
},
})
// Embedding the bundle invalidates the linker's ad-hoc signature, and macOS 27+
// SIGKILLs binaries with invalid pages. Re-sign ad-hoc; release CI re-signs with Developer ID.
if (item.os === "darwin" && process.platform === "darwin") {
await $`codesign --force --sign - dist/${name}/bin/opencode`
}
// Smoke test: only run if binary is for current platform
if (item.os === process.platform && item.arch === process.arch && !item.abi) {
const binaryPath = `dist/${name}/bin/opencode`