Add procedure to codesign app bundle in mac crafter

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-06-20 18:11:33 +08:00 committed by Claudio Cambra
parent a73877cece
commit a9196609b0

View file

@ -48,6 +48,9 @@ struct MacCrafter: ParsableCommand {
@Option(name: [.long], help: "Skip code-signing dependency libraries and plugins.")
var skipDependencyCodeSigning = false
@Option(name: [.long], help: "The application's branded name.")
var appName = "Nextcloud"
mutating func run() throws {
print("Configuring build tooling.")
@ -113,6 +116,12 @@ struct MacCrafter: ParsableCommand {
print("Crafting Nextcloud Desktop Client...")
shell("\(craftCommand) --src-dir \(repoRootDir) -i --build-type \(buildType) nextcloud-client")
if let codeSignIdentity {
let clientAppDir =
"\(buildPath)/\(craftTarget)/build/nextcloud-client/image-\(buildType)-master/\(appName).app"
try codesign(identity: codeSignIdentity, path: clientAppDir)
}
}
}