2025-02-18 23:03:51 +00:00
|
|
|
import ArgumentParser
|
|
|
|
import ColibriLibrary
|
|
|
|
|
|
|
|
extension Colibri {
|
|
|
|
struct Build: AsyncParsableCommand {
|
|
|
|
|
|
|
|
// MARK: Properties
|
|
|
|
|
|
|
|
static let configuration = CommandConfiguration(
|
|
|
|
commandName: "build-project",
|
|
|
|
abstract: "Build a Hummingbird app",
|
|
|
|
helpNames: .shortAndLong,
|
|
|
|
aliases: ["build"]
|
|
|
|
)
|
|
|
|
|
|
|
|
@OptionGroup var options: Options
|
|
|
|
|
|
|
|
// MARK: Functions
|
|
|
|
|
|
|
|
mutating func run() async throws {
|
|
|
|
let terminalService = TerminalService()
|
|
|
|
|
2025-02-22 00:33:52 +00:00
|
|
|
let buildArtifact = BuildArtifactTask(terminalService: terminalService)
|
2025-02-18 23:03:51 +00:00
|
|
|
|
2025-02-22 00:33:52 +00:00
|
|
|
try await buildArtifact(options.artifact, at: options.locationURL)
|
2025-02-18 23:03:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|