From 099648825e1ed1e51eb7d7d8d043c4db4ce588da Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Sat, 22 Jun 2024 17:29:21 +0800 Subject: [PATCH] Improve build mode flag handling in mac crafter Signed-off-by: Claudio Cambra --- admin/osx/mac-crafter/Sources/main.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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.") } -- 2.30.2