Files
SideStore/Sources/Cargo/Commands/Cargo.swift
2023-03-10 19:30:09 -05:00

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
)
}()
}