From bf762326e5b45e1f77c9ba4c1f8238c7618b6ec7 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Tue, 16 Jul 2024 15:54:44 +0800 Subject: [PATCH] Add option to set product path in mac-crafter Signed-off-by: Claudio Cambra --- admin/osx/mac-crafter/Sources/main.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/admin/osx/mac-crafter/Sources/main.swift b/admin/osx/mac-crafter/Sources/main.swift index 183c792400a5a..db79807bdd455 100644 --- a/admin/osx/mac-crafter/Sources/main.swift +++ b/admin/osx/mac-crafter/Sources/main.swift @@ -36,6 +36,9 @@ struct MacCrafter: ParsableCommand { @Option(name: [.short, .long], help: "Path for build files to be written.") var buildPath = "\(FileManager.default.currentDirectoryPath)/build" + @Option(name: [.short, .long], help: "Path for the final product to be put.") + var productPath = "\(FileManager.default.currentDirectoryPath)/product" + @Option(name: [.short, .long], help: "Architecture.") var arch = "arm64" @@ -200,6 +203,10 @@ struct MacCrafter: ParsableCommand { let clientAppDir = "\(clientBuildDir)/image-\(buildType)-master/\(appName).app" try codesignClientAppBundle(at: clientAppDir, withCodeSignIdentity: codeSignIdentity) + print("Placing Nextcloud Desktop Client in product directory...") + try fm.createDirectory(atPath: productPath, withIntermediateDirectories: true, attributes: nil) + try fm.copyItem(atPath: clientAppDir, toPath: productPath) + print("Done!") } }