@Flag(help: "Run a full rebuild.")
var fullRebuild = false
+ @Flag(help: "Create an installer package.")
+ var package = false
+
mutating func run() throws {
print("Configuring build tooling.")
let allOptionsString = craftOptions.map({ "--options \"\($0)\"" }).joined(separator: " ")
+ let buildWorkPath = "\(buildPath)/\(craftTarget)/build"
let clientBuildDir = "\(buildPath)/\(craftTarget)/build/\(craftBlueprintName)"
if fullRebuild {
do {
}
try fm.copyItem(atPath: clientAppDir, toPath: "\(productPath)/\(appName).app")
- print("Placing Nextcloud Desktop Client in product directory...")
- try fm.createDirectory(atPath: productPath, withIntermediateDirectories: true, attributes: nil)
- try fm.copyItem(atPath: clientAppDir, toPath: productPath)
+ if package {
+ let packagePath =
+ try buildPackage(buildWorkPath: buildWorkPath, productPath: productPath)
+ }
print("Done!")
}