generated from hashicorp/packer-plugin-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 10
/
main.go
34 lines (29 loc) · 937 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
32
33
34
package main
import (
"fmt"
"github.com/ethanmdavidson/packer-plugin-git/datasource/commit"
"github.com/ethanmdavidson/packer-plugin-git/datasource/repository"
"github.com/ethanmdavidson/packer-plugin-git/datasource/tree"
"os"
"github.com/hashicorp/packer-plugin-sdk/plugin"
"github.com/hashicorp/packer-plugin-sdk/version"
)
var (
// Version is the main version number that is being run at the moment.
Version = "0.6.3"
// PluginVersion is used by the plugin set to allow Packer to recognize
// what version this plugin is.
PluginVersion = version.NewRawVersion(Version)
)
func main() {
pps := plugin.NewSet()
pps.RegisterDatasource("commit", new(commit.Datasource))
pps.RegisterDatasource("repository", new(repository.Datasource))
pps.RegisterDatasource("tree", new(tree.Datasource))
pps.SetVersion(PluginVersion)
err := pps.Run()
if err != nil {
_, _ = fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
}