forked from SwampDragons/packer-provisioner-comment
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.go
38 lines (31 loc) · 867 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
35
36
37
38
package main
import (
"fmt"
"os"
"packer-plugin-comment/comment"
"github.com/hashicorp/packer-plugin-sdk/plugin"
"github.com/hashicorp/packer-plugin-sdk/version"
)
var (
// The main version number that is being run at the moment.
Version = "1.0.0"
// A pre-release marker for the Version. If this is "" (empty string)
// then it means that it is a final release. Otherwise, this is a pre-release
// such as "dev" (in development), "beta", "rc1", etc.
VersionPrerelease = "dev"
)
var PluginVersion *version.PluginVersion
func init() {
PluginVersion = version.InitializePluginVersion(
Version, VersionPrerelease)
}
func main() {
pps := plugin.NewSet()
pps.RegisterProvisioner(plugin.DEFAULT_NAME, new(comment.Provisioner))
pps.SetVersion(PluginVersion)
err := pps.Run()
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
os.Exit(1)
}
}