|
|
@ -94,10 +94,20 @@ func init() {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
"version": func() (cli.Command, error) {
|
|
|
|
"version": func() (cli.Command, error) {
|
|
|
|
|
|
|
|
ver := ""
|
|
|
|
|
|
|
|
rel := ""
|
|
|
|
|
|
|
|
if len(GitDescribe) == 0 {
|
|
|
|
|
|
|
|
ver = Version
|
|
|
|
|
|
|
|
rel = "dev"
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
ver = GitDescribe
|
|
|
|
|
|
|
|
rel = VersionPrerelease
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return &command.VersionCommand{
|
|
|
|
return &command.VersionCommand{
|
|
|
|
Revision: GitCommit,
|
|
|
|
Revision: GitCommit,
|
|
|
|
Version: GitDescribe,
|
|
|
|
Version: ver,
|
|
|
|
VersionPrerelease: VersionPrerelease,
|
|
|
|
VersionPrerelease: rel,
|
|
|
|
Ui: ui,
|
|
|
|
Ui: ui,
|
|
|
|
}, nil
|
|
|
|
}, nil
|
|
|
|
},
|
|
|
|
},
|
|
|
|