From 6f1f0ba56215d5e44e162ef9f06cee582a5bede9 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Sat, 22 Jun 2024 16:01:22 +0800 Subject: [PATCH] Use --options as recommended for configuring craft build in mac crafter Signed-off-by: Claudio Cambra --- admin/osx/mac-crafter/Sources/main.swift | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) 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 {