-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmain.go
56 lines (45 loc) · 1.24 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package main
import (
"fmt"
"os"
"github.com/revanite-io/pvtr-github-repo/data"
"github.com/revanite-io/pvtr-github-repo/evaluation_plans"
"github.com/privateerproj/privateer-sdk/command"
"github.com/privateerproj/privateer-sdk/pluginkit"
)
var (
// Version is to be replaced at build time by the associated tag
Version = "0.0.0"
// VersionPostfix is a marker for the version such as "dev", "beta", "rc", etc.
VersionPostfix = "dev"
// GitCommitHash is the commit at build time
GitCommitHash = ""
// BuiltAt is the actual build datetime
BuiltAt = ""
PluginName = "github-repo"
RequiredVars = []string{
"owner",
"repo",
"token",
}
)
func main() {
if VersionPostfix != "" {
Version = fmt.Sprintf("%s-%s", Version, VersionPostfix)
}
// NewVessel may take a payload for all suites to reference
pvtrVessel := pluginkit.NewVessel(PluginName, data.Loader, RequiredVars)
// Evaluation Suite may optionally take a payload to selectively override the data specified in NewVessel
pvtrVessel.AddEvaluationSuite("OSPS_B", data.Loader, evaluation_plans.OSPS_B)
runCmd := command.NewPluginCommands(
PluginName,
Version,
VersionPostfix,
GitCommitHash,
pvtrVessel,
)
err := runCmd.Execute()
if err != nil {
os.Exit(1)
}
}