mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 04:55:48 +03:00
Move building into separate subcommand, add subcommand just for codesigning
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
8620ff5127
commit
7f3b13718a
1 changed files with 26 additions and 4 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue