mirror of
https://github.com/mas-cli/mas
synced 2024-11-26 21:40:19 +00:00
21 lines
558 B
Swift
21 lines
558 B
Swift
//
|
|
// Version.swift
|
|
// mas-cli
|
|
//
|
|
// Created by Andrew Naylor on 20/09/2015.
|
|
// Copyright © 2015 Andrew Naylor. All rights reserved.
|
|
//
|
|
|
|
struct VersionCommand: CommandType {
|
|
typealias Options = NoOptions<MASError>
|
|
let verb = "version"
|
|
let function = "Print version number"
|
|
|
|
func run(options: Options) -> Result<(), MASError> {
|
|
let plist = NSBundle.mainBundle().infoDictionary
|
|
if let versionString = plist?["CFBundleShortVersionString"] {
|
|
print(versionString)
|
|
}
|
|
return .Success(())
|
|
}
|
|
}
|