Allow setting of build type in mac crafter
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Thu, 20 Jun 2024 10:09:48 +0000 (18:09 +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 5c7a05d25034b88a7b169ab23c2a4f0e1c21679e..d3b615e7f82aecae0faa2d6512cfdf4d153c3523 100644 (file)
@@ -42,6 +42,9 @@ struct MacCrafter: ParsableCommand {
     @Option(name: [.long], help: "Nextcloud Desktop Client git url.")
     var clientBlueprintsGitUrl = "https://github.com/nextcloud/desktop-client-blueprints.git"
 
+    @Option(name: [.long], help: "Build type (e.g. Release, RelWithDebInfo, MinSizeRel, Debug).")
+    var buildType = "RelWithDebInfo"
+
     mutating func run() throws {
         print("Configuring build tooling.")
 
@@ -106,7 +109,7 @@ struct MacCrafter: ParsableCommand {
         }
 
         print("Crafting Nextcloud Desktop Client...")
-        shell("\(craftCommand) --src-dir \(repoRootDir) nextcloud-client")
+        shell("\(craftCommand) --src-dir \(repoRootDir) -i --build-type \(buildType) nextcloud-client")
     }
 }