From: Claudio Cambra Date: Wed, 11 Sep 2024 19:54:01 +0000 (+0800) Subject: Move building into separate subcommand, add subcommand just for codesigning X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~5^2~202^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7f3b13718ad477ae376d2297150178d1f7c2bda0;p=nextcloud-desktop.git Move building into separate subcommand, add subcommand just for codesigning Signed-off-by: Claudio Cambra --- diff --git a/admin/osx/mac-crafter/Sources/main.swift b/admin/osx/mac-crafter/Sources/main.swift index 7e92f7878..0492d9fc5 100644 --- a/admin/osx/mac-crafter/Sources/main.swift +++ b/admin/osx/mac-crafter/Sources/main.swift @@ -15,10 +15,8 @@ import ArgumentParser import Foundation -struct MacCrafter: ParsableCommand { - static let configuration = CommandConfiguration( - abstract: "A tool to easily build a fully-functional Nextcloud Desktop Client for macOS." - ) +struct Build: ParsableCommand { + static let configuration = CommandConfiguration(abstract: "Client building script") enum MacCrafterError: Error { case failedEnumeration(String) @@ -215,4 +213,28 @@ struct MacCrafter: ParsableCommand { } } +struct Codesign: ParsableCommand { + static let configuration = CommandConfiguration(abstract: "Codesigning script for the client.") + + @Argument(help: "Path to the Nextcloud Desktop Client app bundle.") + var appBundlePath = "\(FileManager.default.currentDirectoryPath)/product/Nextcloud.app" + + @Option(name: [.short, .long], help: "Code signing identity for desktop client and libs.") + var codeSignIdentity: String + + mutating func run() throws { + try codesignClientAppBundle(at: appBundlePath, withCodeSignIdentity: codeSignIdentity) + } +} + +struct MacCrafter: ParsableCommand { + static let configuration = CommandConfiguration( + abstract: "A tool to easily build a fully-functional Nextcloud Desktop Client for macOS.", + subcommands: [Build.self, Codesign.self], + defaultSubcommand: Build.self + ) + + +} + MacCrafter.main()