Skip to content

Commit

Permalink
Add option to set product path in mac-crafter
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Jul 19, 2024
1 parent 08089d7 commit bf76232
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions admin/osx/mac-crafter/Sources/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"

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

0 comments on commit bf76232

Please sign in to comment.