Skip to content

Commit

Permalink
refactor: Multi-component plugin (#107)
Browse files Browse the repository at this point in the history
Since Packer v1.7.0 multi-component plugins are recomended
  • Loading branch information
eaglesemanation committed Oct 15, 2021
1 parent 920cc8d commit 72c0471
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
)

func main() {
server, err := plugin.Server()
pps := plugin.NewSet()
pps.RegisterBuilder(plugin.DEFAULT_NAME, builder.NewBuilder())
pps.RegisterPostProcessor(plugin.DEFAULT_NAME, postprocessor.NewFlasher())
err := pps.Run()
if err != nil {
panic(err)
}
server.RegisterBuilder(builder.NewBuilder())
server.RegisterPostProcessor(postprocessor.NewFlasher())
server.Serve()
}

0 comments on commit 72c0471

Please sign in to comment.