| 1304 | } |
| 1305 | |
| 1306 | func 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 | |
| 1325 | func metalint() { |
| 1326 | lazyRebuildAssets() |