generated from hashicorp/packer-plugin-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 24
/
main.go
31 lines (26 loc) · 1014 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
30
31
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package main
import (
"fmt"
"os"
"github.com/hashicorp/packer-plugin-sdk/plugin"
vagrantB "github.com/hashicorp/packer-plugin-vagrant/builder/vagrant"
vagrantRegistryPP "github.com/hashicorp/packer-plugin-vagrant/post-processor/hcp-vagrant-registry"
vagrantPP "github.com/hashicorp/packer-plugin-vagrant/post-processor/vagrant"
vagrantCloudPP "github.com/hashicorp/packer-plugin-vagrant/post-processor/vagrant-cloud"
"github.com/hashicorp/packer-plugin-vagrant/version"
)
func main() {
pps := plugin.NewSet()
pps.RegisterBuilder(plugin.DEFAULT_NAME, new(vagrantB.Builder))
pps.RegisterPostProcessor(plugin.DEFAULT_NAME, new(vagrantPP.PostProcessor))
pps.RegisterPostProcessor("cloud", new(vagrantCloudPP.PostProcessor))
pps.RegisterPostProcessor("registry", new(vagrantRegistryPP.PostProcessor))
pps.SetVersion(version.PluginVersion)
err := pps.Run()
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
}