Initial build command

This commit is contained in:
Mitchell Hashimoto 2013-04-15 14:36:23 -07:00
parent 759261dcf1
commit 8c5b695de7
2 changed files with 12 additions and 0 deletions

11
packer/build_command.go Normal file
View File

@ -0,0 +1,11 @@
package packer
type buildCommand byte
func (buildCommand) Run(env *Environment, args []string) int {
return 0
}
func (buildCommand) Synopsis() string {
return "build machines images from Packer template"
}

View File

@ -42,6 +42,7 @@ type Environment struct {
func NewEnvironment() *Environment {
env := &Environment{}
env.command = make(map[string]Command)
env.command["build"] = new(buildCommand)
env.command["version"] = new(versionCommand)
env.ui = &ReaderWriterUi{os.Stdin, os.Stdout}
return env