Merge pull request #6966 from nextcloud/bugfix/mac-crafter-product-path

Fix product path handling in Mac Crafter
This commit is contained in:
Camila Ayres 2024-08-06 11:06:02 +02:00 committed by GitHub
commit 5edd7a25af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View file

@ -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*

View file

@ -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!")
}