Use --options as recommended for configuring craft build in mac crafter

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-06-22 16:01:22 +08:00 committed by Claudio Cambra
parent 78b41e09a0
commit 6f1f0ba562

View file

@ -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 {