From: Claudio Cambra Date: Sat, 22 Jun 2024 09:29:21 +0000 (+0800) Subject: Improve build mode flag handling in mac crafter X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~6^2~127 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=099648825e1ed1e51eb7d7d8d043c4db4ce588da;p=nextcloud-desktop.git Improve build mode flag handling in mac crafter Signed-off-by: Claudio Cambra --- diff --git a/admin/osx/mac-crafter/Sources/main.swift b/admin/osx/mac-crafter/Sources/main.swift index 96f0e108b..4dec3941c 100644 --- a/admin/osx/mac-crafter/Sources/main.swift +++ b/admin/osx/mac-crafter/Sources/main.swift @@ -73,6 +73,9 @@ struct MacCrafter: ParsableCommand { @Option(name: [.long], help: "Git clone command; include options such as depth.") var gitCloneCommand = "git clone --depth=1" + @Option(name: [.long], help: "Run a full rebuild.") + var fullRebuild = false + mutating func run() throws { print("Configuring build tooling.") @@ -160,8 +163,9 @@ struct MacCrafter: ParsableCommand { let allOptionsString = craftOptions.map({ "--options \"\($0)\"" }).joined(separator: " ") + let buildMode = fullRebuild ? "-i" : buildAppBundle ? "--compile --install" : "--compile" guard shell( - "\(craftCommand) --buildtype \(buildType) --compile --install \(allOptionsString) \(craftBlueprintName)" + "\(craftCommand) --buildtype \(buildType) \(buildMode) \(allOptionsString) \(craftBlueprintName)" ) == 0 else { throw MacCrafterError.craftError("Error crafting Nextcloud Desktop Client.") }