From db0c57732183b583796737680c2933c795d2844c Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Mon, 24 Jun 2024 19:41:28 +0800 Subject: [PATCH] Add offline flag to 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 c845bc4a0009..2ae6379fa29a 100644 --- a/admin/osx/mac-crafter/Sources/main.swift +++ b/admin/osx/mac-crafter/Sources/main.swift @@ -64,6 +64,9 @@ struct MacCrafter: ParsableCommand { @Flag(help: "Reconfigure KDE Craft.") var reconfigureCraft = false + @Flag(help: "Run build offline (i.e. do not update craft)") + var offline = false + @Flag(help: "Build test suite.") var buildTests = false @@ -177,8 +180,9 @@ struct MacCrafter: ParsableCommand { } let buildMode = fullRebuild ? "-i" : disableAppBundle ? "compile" : "--compile --install" + let offlineMode = offline ? "--offline" : "" guard shell( - "\(craftCommand) --buildtype \(buildType) \(buildMode) \(allOptionsString) \(craftBlueprintName)" + "\(craftCommand) --buildtype \(buildType) \(buildMode) \(offlineMode) \(allOptionsString) \(craftBlueprintName)" ) == 0 else { throw MacCrafterError.craftError("Error crafting Nextcloud Desktop Client.") }