-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.go
More file actions
32 lines (28 loc) · 907 Bytes
/
main.go
File metadata and controls
32 lines (28 loc) · 907 Bytes
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
32
// Copyright IBM Corp. 2021, 2025
// SPDX-License-Identifier: MPL-2.0
package main
import (
"fmt"
"os"
"packer-plugin-hashicups/builder/order"
"packer-plugin-hashicups/datasource/coffees"
"packer-plugin-hashicups/datasource/ingredients"
"packer-plugin-hashicups/post-processor/receipt"
"packer-plugin-hashicups/provisioner/toppings"
"packer-plugin-hashicups/version"
"github.com/hashicorp/packer-plugin-sdk/plugin"
)
func main() {
pps := plugin.NewSet()
pps.RegisterDatasource("coffees", new(coffees.Datasource))
pps.RegisterDatasource("ingredients", new(ingredients.Datasource))
pps.RegisterBuilder("order", new(order.Builder))
pps.RegisterProvisioner("toppings", new(toppings.Provisioner))
pps.RegisterPostProcessor("receipt", new(receipt.PostProcessor))
pps.SetVersion(version.PluginVersion)
err := pps.Run()
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
}