From: Claudio Cambra Date: Sat, 22 Jun 2024 08:01:22 +0000 (+0800) Subject: Use --options as recommended for configuring craft build in mac crafter X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~6^2~133 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6f1f0ba56215d5e44e162ef9f06cee582a5bede9;p=nextcloud-desktop.git Use --options as recommended for configuring craft build 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 80b04d9cc..00b5a8950 100644 --- a/admin/osx/mac-crafter/Sources/main.swift +++ b/admin/osx/mac-crafter/Sources/main.swift @@ -110,7 +110,7 @@ struct MacCrafter: ParsableCommand { shell("\(craftCommand) --install-deps \(craftBlueprintName)") } - var craftOptions: [String] = [] + var craftOptions = ["\(craftBlueprintName).srcDir=\(repoRootDir)"] if buildAutoUpdater { print("Configuring Sparkle auto-updater.") @@ -128,20 +128,17 @@ struct MacCrafter: ParsableCommand { throw MacCrafterError.environmentError("Error unpacking sparkle.") } - craftOptions.append("sparkleLibPath=\(buildPath)/Sparkle.framework") + craftOptions.append( + "\(craftBlueprintName).sparkleLibPath=\(buildPath)/Sparkle.framework" + ) } print("Crafting Nextcloud Desktop Client...") - if !craftOptions.isEmpty { - let craftOptionsArg = craftOptions.map { "--set \"\($0)\"" } - for option in craftOptions { - shell("\(craftCommand) \(option) \(craftBlueprintName)") - } - } - + let allOptionsString = craftOptions.map({ "--options \"\($0)\"" }).joined(separator: " ") + shell( - "\(craftCommand) --src-dir \(repoRootDir) --buildtype \(buildType) -i nextcloud-client" + "\(craftCommand) --buildtype \(buildType) -i \(allOptionsString) \(craftBlueprintName)" ) guard let codeSignIdentity else {