2021-02-23 16:46:11 -06:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/xenserver/packer-builder-xenserver/builder/xenserver/iso"
|
|
|
|
"github.com/xenserver/packer-builder-xenserver/builder/xenserver/xva"
|
|
|
|
|
|
|
|
"github.com/hashicorp/packer-plugin-sdk/plugin"
|
|
|
|
"github.com/hashicorp/packer-plugin-sdk/version"
|
|
|
|
)
|
2021-02-23 17:02:50 -06:00
|
|
|
|
2021-02-23 16:46:11 -06:00
|
|
|
var (
|
|
|
|
// Version is the main version number that is being run at the moment.
|
2024-01-09 20:33:52 -06:00
|
|
|
Version = "v0.6.0"
|
2021-02-23 16:46:11 -06:00
|
|
|
|
|
|
|
// VersionPrerelease is 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.
|
2021-03-10 00:29:34 -06:00
|
|
|
VersionPrerelease = ""
|
2021-02-23 16:46:11 -06:00
|
|
|
|
|
|
|
// PluginVersion is used by the plugin set to allow Packer to recognize
|
|
|
|
// what version this plugin is.
|
|
|
|
PluginVersion = version.InitializePluginVersion(Version, VersionPrerelease)
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
pps := plugin.NewSet()
|
|
|
|
pps.RegisterBuilder("iso", new(iso.Builder))
|
|
|
|
pps.RegisterBuilder("xva", new(xva.Builder))
|
|
|
|
pps.SetVersion(PluginVersion)
|
|
|
|
err := pps.Run()
|
|
|
|
if err != nil {
|
|
|
|
fmt.Fprintln(os.Stderr, err.Error())
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
}
|