fix: Zip bundle directory instead of parent dir
Some checks are pending
CI / Test on Linux (push) Waiting to run
CI / Test on Linux-1 (push) Waiting to run
CI / Test on macOS (push) Waiting to run
CI / Test on macOS-1 (push) Waiting to run

This commit is contained in:
Shibo Lyu 2026-01-20 23:51:23 +08:00
parent f9024a8cd7
commit 8032cfa0b2

View file

@ -22,14 +22,12 @@ extension ArtifactBundleBuilder {
}
let bundleDirURL = URL(fileURLWithPath: bundleDir)
let workDirURL = bundleDirURL.deletingLastPathComponent()
let bundleName = bundleDirURL.lastPathComponent
let process = Process()
process.executableURL = URL(fileURLWithPath: "/usr/bin/zip")
let zipPathURL = URL(fileURLWithPath: zipPath).standardizedFileURL
process.arguments = ["-r", zipPathURL.path, bundleName]
process.currentDirectoryURL = workDirURL
process.arguments = ["-r", zipPathURL.path, "."]
process.currentDirectoryURL = bundleDirURL
try process.run()
process.waitUntilExit()