Make mac-related build options configurable in mac crafter
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Sat, 22 Jun 2024 08:49:55 +0000 (16:49 +0800)
committerClaudio Cambra <developer@claudiocambra.com>
Mon, 8 Jul 2024 07:41:45 +0000 (15:41 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
admin/osx/mac-crafter/Sources/main.swift

index 28944af4d9038376194827f5012c1bedb8d45b22..96f0e108b5e5303f91db96c6ef2aa7c51b89604e 100644 (file)
@@ -64,6 +64,12 @@ struct MacCrafter: ParsableCommand {
     var sparkleDownloadUrl =
         "https://github.com/sparkle-project/Sparkle/releases/download/1.27.3/Sparkle-1.27.3.tar.xz"
 
+    @Option(name: [.long], help: "Build App Bundle.")
+    var buildAppBundle = true
+
+    @Option(name: [.long], help: "Build File Provider Module.")
+    var buildFileProviderModule = false
+
     @Option(name: [.long], help: "Git clone command; include options such as depth.")
     var gitCloneCommand = "git clone --depth=1"
 
@@ -123,7 +129,11 @@ struct MacCrafter: ParsableCommand {
             }
         }
 
-        var craftOptions = ["\(craftBlueprintName).srcDir=\(repoRootDir)"]
+        var craftOptions = [
+            "\(craftBlueprintName).srcDir=\(repoRootDir)",
+            "\(craftBlueprintName).buildMacOSBundle=\(buildAppBundle ? "True" : "False")",
+            "\(craftBlueprintName).buildFileProviderModule=\(buildFileProviderModule ? "True" : "False")"
+        ]
 
         if buildAutoUpdater {
             print("Configuring Sparkle auto-updater.")