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