mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-09 23:03:27 +01:00
28 lines
739 B
Swift
28 lines
739 B
Swift
import ArgumentParser
|
|
import SwiftLintFramework
|
|
import OSLog
|
|
#if canImport(Logging)
|
|
import Logging
|
|
#endif
|
|
|
|
extension Cargo {
|
|
struct Version: ParsableCommand {
|
|
@Flag(help: "Display full version info")
|
|
var verbose = false
|
|
|
|
static let configuration = CommandConfiguration(abstract: "Display the current version of Cargo")
|
|
|
|
static var value: String { "TODO" }
|
|
|
|
func run() throws {
|
|
if verbose, let buildID = ExecutableInfo.buildID {
|
|
os_log("Version: %@", type: .info , Self.value)
|
|
os_log("Build ID: %@", type: .info , buildID)
|
|
} else {
|
|
print(Self.value)
|
|
}
|
|
ExitHelper.successfullyExit()
|
|
}
|
|
}
|
|
}
|