Files
Packer-Cn/packer/version.go
T
Mitchell Hashimoto bbafcfa938 packer, etc: added Help method to Command interface
This will be used for long-form help when "packer help foo"
or "packer foo --help" is called.
2013-06-02 11:41:12 -07:00

25 lines
497 B
Go

package packer
import "fmt"
// The version of packer.
const Version = "0.1.0.dev"
type versionCommand byte
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.`
}
func (versionCommand) Run(env Environment, args []string) int {
env.Ui().Say(fmt.Sprintf("Packer v%v\n", Version))
return 0
}
func (versionCommand) Synopsis() string {
return "print Packer version"
}