MCPcopy
hub / github.com/syncthing/syncthing / macosCodesign

Function macosCodesign

build.go:1306–1323  ·  view source on GitHub ↗
(file string)

Source from the content-addressed store, hash-verified

1304}
1305
1306func macosCodesign(file string) {
1307 if pass := os.Getenv("CODESIGN_KEYCHAIN_PASS"); pass != "" {
1308 bs, err := runError("security", "unlock-keychain", "-p", pass)
1309 if err != nil {
1310 log.Println("Codesign: unlocking keychain failed:", string(bs))
1311 return
1312 }
1313 }
1314
1315 if id := os.Getenv("CODESIGN_IDENTITY"); id != "" {
1316 bs, err := runError("codesign", "--options=runtime", "-s", id, file)
1317 if err != nil {
1318 log.Println("Codesign: signing failed:", string(bs))
1319 return
1320 }
1321 log.Println("Codesign: successfully signed", file)
1322 }
1323}
1324
1325func metalint() {
1326 lazyRebuildAssets()

Callers 1

codesignFunction · 0.85

Calls 1

runErrorFunction · 0.85

Tested by

no test coverage detected