Merge pull request #399 from tuist/env-version
[env-version] added version command with envversion
This commit is contained in:
commit
fdbb740103
|
@ -6,6 +6,7 @@ Please, check out guidelines: https://keepachangelog.com/en/1.0.0/
|
|||
|
||||
### Added
|
||||
- `DefaultSettings.none` to disable the generation of default build settings https://github.com/tuist/tuist/pull/395 by @pepibumur.
|
||||
- Version information for tuistenv https://github.com/tuist/tuist/pull/399 by @ollieatkinson
|
||||
|
||||
### Fixed
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ public final class CommandRegistry {
|
|||
UpdateCommand.self,
|
||||
InstallCommand.self,
|
||||
UninstallCommand.self,
|
||||
VersionCommand.self,
|
||||
])
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
import Basic
|
||||
import Foundation
|
||||
import SPMUtility
|
||||
import TuistCore
|
||||
|
||||
class VersionCommand: NSObject, Command {
|
||||
// MARK: - Command
|
||||
|
||||
static let command = "envversion"
|
||||
static let overview = "Outputs the current version of tuist env."
|
||||
|
||||
// MARK: - Attributes
|
||||
|
||||
let printer: Printing
|
||||
|
||||
// MARK: - Init
|
||||
|
||||
required init(parser: ArgumentParser) {
|
||||
parser.add(subparser: VersionCommand.command, overview: VersionCommand.overview)
|
||||
printer = Printer()
|
||||
}
|
||||
|
||||
init(printer: Printing) {
|
||||
self.printer = printer
|
||||
}
|
||||
|
||||
// MARK: - Command
|
||||
|
||||
func run(with _: ArgumentParser.Result) {
|
||||
printer.print(Constants.version)
|
||||
}
|
||||
}
|
|
@ -93,6 +93,15 @@ Installing...
|
|||
Version 0.4.0 installed
|
||||
```
|
||||
|
||||
### tuist envversion
|
||||
|
||||
To check the current installed version of `tuistenv`, the command is:
|
||||
|
||||
```sh
|
||||
tuist envversion
|
||||
0.15.0
|
||||
```
|
||||
|
||||
## Running Tuist
|
||||
|
||||
As we mentioned earlier, Tuist version management works **transparently**. Any of the commands mentioned above are necessary to use Tuist.
|
||||
|
|
Loading…
Reference in New Issue