Build command plugin
This commit is contained in:
parent
8697cb6f6a
commit
399d8ab028
@ -1,12 +1,11 @@
|
||||
package build
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
import "github.com/mitchellh/packer/packer"
|
||||
|
||||
type Command byte
|
||||
type buildCommand byte
|
||||
|
||||
func (Command) Run(env *packer.Environment, arg []string) int {
|
||||
fmt.Println("HI!")
|
||||
func (Command) Run(env packer.Environment, arg []string) int {
|
||||
env.Ui().Say("BUILDING!")
|
||||
return 0
|
||||
}
|
||||
|
||||
|
7
command/build/main.go
Normal file
7
command/build/main.go
Normal file
@ -0,0 +1,7 @@
|
||||
package main
|
||||
|
||||
import "github.com/mitchellh/packer/packer/plugin"
|
||||
|
||||
func main() {
|
||||
plugin.ServeCommand(new(buildCommand))
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user