packer: only show git commit in version output for prerelease
This commit is contained in:
parent
3b32ba9f11
commit
207c15b91b
|
@ -31,10 +31,10 @@ func (versionCommand) Run(env Environment, args []string) int {
|
||||||
fmt.Fprintf(&versionString, "Packer v%s", Version)
|
fmt.Fprintf(&versionString, "Packer v%s", Version)
|
||||||
if VersionPrerelease != "" {
|
if VersionPrerelease != "" {
|
||||||
fmt.Fprintf(&versionString, ".%s", VersionPrerelease)
|
fmt.Fprintf(&versionString, ".%s", VersionPrerelease)
|
||||||
}
|
|
||||||
|
|
||||||
if GitCommit != "" {
|
if GitCommit != "" {
|
||||||
fmt.Fprintf(&versionString, " (%s)", GitCommit)
|
fmt.Fprintf(&versionString, " (%s)", GitCommit)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
env.Ui().Say(versionString.String())
|
env.Ui().Say(versionString.String())
|
||||||
|
|
Loading…
Reference in New Issue