Skip to content

Commit

Permalink
Add offline flag to mac crafter
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
  • Loading branch information
claucambra committed Jul 8, 2024
1 parent f0166b2 commit db0c577
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion admin/osx/mac-crafter/Sources/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.")
}
Expand Down

0 comments on commit db0c577

Please sign in to comment.