mirror of
https://github.com/mas-cli/mas
synced 2024-11-26 05:20:18 +00:00
4848f422d6
Fixes #364.
24 lines
573 B
Swift
24 lines
573 B
Swift
//
|
|
// Version.swift
|
|
// mas-cli
|
|
//
|
|
// Created by Andrew Naylor on 20/09/2015.
|
|
// Copyright © 2015 Andrew Naylor. All rights reserved.
|
|
//
|
|
|
|
import Commandant
|
|
|
|
/// Command which displays the version of the mas tool.
|
|
public struct VersionCommand: CommandProtocol {
|
|
public typealias Options = NoOptions<MASError>
|
|
public let verb = "version"
|
|
public let function = "Print version number"
|
|
|
|
public init() {}
|
|
|
|
/// Runs the command.
|
|
public func run(_: Options) -> Result<Void, MASError> {
|
|
print(Package.version)
|
|
return .success(())
|
|
}
|
|
}
|