forked from hashicorp/packer-plugin-googlecompute
/
main.go
26 lines (22 loc) · 847 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package main
import (
"fmt"
"os"
"github.com/hashicorp/packer-plugin-googlecompute/version"
"github.com/hashicorp/packer-plugin-sdk/plugin"
googlecompute "github.com/hashicorp/packer-plugin-googlecompute/builder/googlecompute"
googlecomputeexport "github.com/hashicorp/packer-plugin-googlecompute/post-processor/googlecompute-export"
googlecomputeimport "github.com/hashicorp/packer-plugin-googlecompute/post-processor/googlecompute-import"
)
func main() {
pps := plugin.NewSet()
pps.RegisterBuilder(plugin.DEFAULT_NAME, new(googlecompute.Builder))
pps.RegisterPostProcessor("import", new(googlecomputeimport.PostProcessor))
pps.RegisterPostProcessor("export", new(googlecomputeexport.PostProcessor))
pps.SetVersion(version.PluginVersion)
err := pps.Run()
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
}