forked from hashicorp/packer-plugin-proxmox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
30 lines (25 loc) · 888 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
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package main
import (
"fmt"
"os"
"github.com/hashicorp/packer-plugin-sdk/plugin"
proxmoxclone "github.com/hashicorp/packer-plugin-proxmox/builder/proxmox/clone"
proxmoxiso "github.com/hashicorp/packer-plugin-proxmox/builder/proxmox/iso"
"github.com/hashicorp/packer-plugin-proxmox/version"
)
func main() {
pps := plugin.NewSet()
// When the builder was split, the alias "proxmox" was added to Packer for the iso builder.
// Registering 'plugin.DEFAULT_NAME' does the same for the external plugin.
pps.RegisterBuilder(plugin.DEFAULT_NAME, new(proxmoxiso.Builder))
pps.RegisterBuilder("iso", new(proxmoxiso.Builder))
pps.RegisterBuilder("clone", new(proxmoxclone.Builder))
pps.SetVersion(version.PluginVersion)
err := pps.Run()
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
}