-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
29 lines (24 loc) · 982 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
27
28
29
package main
import (
"fmt"
"os"
"github.com/hashicorp/packer-plugin-sdk/plugin"
exampleBuilder "github.com/takumin/packer-plugin-boilerplate/builder/example"
exampleDataSource "github.com/takumin/packer-plugin-boilerplate/datasource/example"
examplePostProcessor "github.com/takumin/packer-plugin-boilerplate/post-processor/example"
exampleProvisioner "github.com/takumin/packer-plugin-boilerplate/provisioner/example"
"github.com/takumin/packer-plugin-boilerplate/version"
)
func main() {
pps := plugin.NewSet()
pps.RegisterBuilder(plugin.DEFAULT_NAME, new(exampleBuilder.Builder))
pps.RegisterProvisioner(plugin.DEFAULT_NAME, new(exampleProvisioner.Provisioner))
pps.RegisterPostProcessor(plugin.DEFAULT_NAME, new(examplePostProcessor.PostProcessor))
pps.RegisterDatasource(plugin.DEFAULT_NAME, new(exampleDataSource.Datasource))
pps.SetVersion(version.PluginVersion)
err := pps.Run()
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
}