Commit d9bfe58c authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer: version machine-readable output

parent ec314538
......@@ -27,6 +27,10 @@ command-line flags for this command.`
}
func (versionCommand) Run(env Environment, args []string) int {
env.Ui().Machine("version", Version)
env.Ui().Machine("version-prelease", VersionPrerelease)
env.Ui().Machine("version-commit", GitCommit)
var versionString bytes.Buffer
fmt.Fprintf(&versionString, "Packer v%s", Version)
if VersionPrerelease != "" {
......
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