mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-08 22:33:26 +01:00
23 lines
653 B
Swift
23 lines
653 B
Swift
import ArgumentParser
|
|
import Foundation
|
|
|
|
@main
|
|
struct Cargo: AsyncParsableCommand {
|
|
static let configuration: CommandConfiguration = {
|
|
if let directory = ProcessInfo.processInfo.environment["BUILD_WORKSPACE_DIRECTORY"] {
|
|
FileManager.default.changeCurrentDirectoryPath(directory)
|
|
}
|
|
|
|
return CommandConfiguration(
|
|
commandName: "cargo",
|
|
abstract: "A tool to build `rust` projects with `cargo`.",
|
|
version: Version.value,
|
|
subcommands: [
|
|
Build.self,
|
|
Version.self
|
|
],
|
|
defaultSubcommand: Build.self
|
|
)
|
|
}()
|
|
}
|