From: Claudio Cambra Date: Wed, 19 Jun 2024 12:29:22 +0000 (+0800) Subject: Add codesign function to macos builder X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~6^2~164 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f45c30d3ff43b067a8dd0af0f33ea9a29043494b;p=nextcloud-desktop.git Add codesign function to macos builder Signed-off-by: Claudio Cambra --- diff --git a/admin/osx/craft-client.swift b/admin/osx/craft-client.swift index 9afd751e2..cf8b12f7e 100644 --- a/admin/osx/craft-client.swift +++ b/admin/osx/craft-client.swift @@ -62,6 +62,19 @@ func installIfMissing( } } +func codesign( + identity: String, + path: String, + options: String = "--timestamp --force --preserve-metadata=entitlements --verbose=4 --options runtime" +) { + print("Code-signing \(path)...") + let command = "codesign -s \"\(identity)\" \(options) \(path)" + guard shell(command) == 0 else { + print("Failed to code-sign \(path).") + exit(1) + } +} + print("Configuring build tooling.") installIfMissing("git", "xcode-select --install")