mirror of
https://github.com/xtool-org/xtool.git
synced 2026-11-16 20:41:53 +03:00
small tweaks
This commit is contained in:
@@ -137,12 +137,8 @@ struct DevBuildCommand: AsyncParsableCommand {
|
||||
if ipa {
|
||||
@Dependency(\.zipCompressor) var compressor
|
||||
finalURL = url.deletingPathExtension().appendingPathExtension("ipa")
|
||||
let tmpDir = try TemporaryDirectory(name: "sh.xtool.tmp")
|
||||
let payloadDir = tmpDir.url.appendingPathComponent("Payload", isDirectory: true)
|
||||
try FileManager.default.createDirectory(
|
||||
at: payloadDir,
|
||||
withIntermediateDirectories: true
|
||||
)
|
||||
let tmpDir = try TemporaryDirectory(name: "Payload")
|
||||
let payloadDir = tmpDir.url
|
||||
try FileManager.default.moveItem(at: url, to: payloadDir.appendingPathComponent(url.lastPathComponent))
|
||||
let ipaURL = try await compressor.compress(directory: payloadDir) { progress in
|
||||
if let progress {
|
||||
|
||||
@@ -13,6 +13,10 @@ package struct TemporaryDirectory: ~Copyable {
|
||||
_ = TemporaryDirectoryRoot.shared
|
||||
}
|
||||
|
||||
/// Creates a temporary directory where `lastPathComponent` is exactly `name`.
|
||||
///
|
||||
/// The directory is deleted on deinit or (if the object never deinits) on next launch.
|
||||
/// To save the contents, move them elsewhere with ``persist(at:)``.
|
||||
package init(name: String) throws {
|
||||
do {
|
||||
let basename = name.replacingOccurrences(of: ".", with: "_")
|
||||
|
||||
Reference in New Issue
Block a user