diff --git a/admin/osx/mac-crafter/.gitignore b/admin/osx/mac-crafter/.gitignore index 07510537b..7377336d9 100644 --- a/admin/osx/mac-crafter/.gitignore +++ b/admin/osx/mac-crafter/.gitignore @@ -1,6 +1,7 @@ .DS_Store /.build /Packages +Package.resolved xcuserdata/ DerivedData/ .swiftpm/configuration/registries.json @@ -8,4 +9,5 @@ DerivedData/ .netrc build/ build\downloads +product/ wget-log* diff --git a/admin/osx/mac-crafter/Sources/main.swift b/admin/osx/mac-crafter/Sources/main.swift index db79807bd..d4d49d389 100644 --- a/admin/osx/mac-crafter/Sources/main.swift +++ b/admin/osx/mac-crafter/Sources/main.swift @@ -203,9 +203,13 @@ 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("Placing Nextcloud Desktop Client in \(productPath)...") + if !fm.fileExists(atPath: productPath) { + try fm.createDirectory( + atPath: productPath, withIntermediateDirectories: true, attributes: nil + ) + } + try fm.copyItem(atPath: clientAppDir, toPath: "\(productPath)/\(appName).app") print("Done!") }