-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.go
56 lines (46 loc) · 1.04 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/eddie-knight/pvtr-osps-baseline/armory"
"github.com/privateerproj/privateer-sdk/command"
"github.com/privateerproj/privateer-sdk/config"
)
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",
}
runCmd = command.NewPluginCommands(
PluginName,
Version,
VersionPostfix,
GitCommitHash,
&armory.Armory,
initializer,
RequiredVars,
)
)
// initializer is a custom function to set up the armory for our usecase
func initializer(c *config.Config) (err error) {
armory.SetupArmory(c)
return
}
func main() {
if VersionPostfix != "" {
Version = fmt.Sprintf("%s-%s", Version, VersionPostfix)
}
err := runCmd.Execute()
if err != nil {
os.Exit(1)
}
}