mirror of https://github.com/hashicorp/consul
Only override version pre-release if blank
parent
7994484dc7
commit
603171df09
18
commands.go
18
commands.go
|
@ -1,11 +1,12 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/signal"
|
||||
|
||||
"github.com/hashicorp/consul/command"
|
||||
"github.com/hashicorp/consul/command/agent"
|
||||
"github.com/mitchellh/cli"
|
||||
"os"
|
||||
"os/signal"
|
||||
)
|
||||
|
||||
// Commands is the mapping of all the available Consul commands.
|
||||
|
@ -94,14 +95,13 @@ func init() {
|
|||
},
|
||||
|
||||
"version": func() (cli.Command, error) {
|
||||
ver := ""
|
||||
rel := ""
|
||||
if len(GitDescribe) == 0 {
|
||||
ver = Version
|
||||
rel = "dev"
|
||||
} else {
|
||||
ver := Version
|
||||
rel := VersionPrerelease
|
||||
if GitDescribe != "" {
|
||||
ver = GitDescribe
|
||||
rel = VersionPrerelease
|
||||
}
|
||||
if GitDescribe == "" && rel == "" {
|
||||
rel = "dev"
|
||||
}
|
||||
|
||||
return &command.VersionCommand{
|
||||
|
|
Loading…
Reference in New Issue