2013-03-24 14:03:53 -07:00
|
|
|
package packer
|
|
|
|
|
2013-05-27 15:12:48 -07:00
|
|
|
import "fmt"
|
|
|
|
|
2013-03-24 14:03:53 -07:00
|
|
|
// The version of packer.
|
|
|
|
const Version = "0.1.0.dev"
|
|
|
|
|
|
|
|
type versionCommand byte
|
|
|
|
|
2013-06-02 11:41:12 -07:00
|
|
|
func (versionCommand) Help() string {
|
|
|
|
return `usage: packer version
|
|
|
|
|
|
|
|
Outputs the version of Packer that is running. There are no additional
|
|
|
|
command-line flags for this command.`
|
|
|
|
}
|
|
|
|
|
2013-05-02 14:03:55 -07:00
|
|
|
func (versionCommand) Run(env Environment, args []string) int {
|
2013-06-02 11:52:49 -07:00
|
|
|
env.Ui().Say(fmt.Sprintf("Packer v%v", Version))
|
2013-03-24 14:03:53 -07:00
|
|
|
return 0
|
|
|
|
}
|
2013-03-24 16:28:35 -07:00
|
|
|
|
|
|
|
func (versionCommand) Synopsis() string {
|
|
|
|
return "print Packer version"
|
|
|
|
}
|