mirror of
https://gitee.com/zhangsken/opencode.git
synced 2026-10-16 02:24:10 +08:00
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:
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user