mirror of
https://github.com/status-im/consul.git
synced 2025-01-10 22:06:20 +00:00
Merge pull request #494 from epankala/version
Update to 'consul version' behaviour
This commit is contained in:
commit
7994484dc7
14
commands.go
14
commands.go
@ -94,10 +94,20 @@ func init() {
|
||||
},
|
||||
|
||||
"version": func() (cli.Command, error) {
|
||||
ver := ""
|
||||
rel := ""
|
||||
if len(GitDescribe) == 0 {
|
||||
ver = Version
|
||||
rel = "dev"
|
||||
} else {
|
||||
ver = GitDescribe
|
||||
rel = VersionPrerelease
|
||||
}
|
||||
|
||||
return &command.VersionCommand{
|
||||
Revision: GitCommit,
|
||||
Version: GitDescribe,
|
||||
VersionPrerelease: VersionPrerelease,
|
||||
Version: ver,
|
||||
VersionPrerelease: rel,
|
||||
Ui: ui,
|
||||
}, nil
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user