2013-03-24 17:03:53 -04:00
|
|
|
package packer
|
|
|
|
|
2013-05-27 18:12:48 -04:00
|
|
|
import "fmt"
|
|
|
|
|
2013-03-24 17:03:53 -04:00
|
|
|
// The version of packer.
|
|
|
|
const Version = "0.1.0.dev"
|
|
|
|
|
|
|
|
type versionCommand byte
|
|
|
|
|
|
|
|
// Implement the Command interface by simply showing the version
|
2013-05-02 17:03:55 -04:00
|
|
|
func (versionCommand) Run(env Environment, args []string) int {
|
2013-05-27 18:12:48 -04:00
|
|
|
env.Ui().Say(fmt.Sprintf("Packer v%v\n", Version))
|
2013-03-24 17:03:53 -04:00
|
|
|
return 0
|
|
|
|
}
|
2013-03-24 19:28:35 -04:00
|
|
|
|
|
|
|
func (versionCommand) Synopsis() string {
|
|
|
|
return "print Packer version"
|
|
|
|
}
|