Commit aef602d0 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer: only show git commit in version output for prerelease

parent 45dfcf59
...@@ -31,11 +31,11 @@ func (versionCommand) Run(env Environment, args []string) int { ...@@ -31,11 +31,11 @@ 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())
return 0 return 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment