-
Notifications
You must be signed in to change notification settings - Fork 37
/
main.go
41 lines (33 loc) · 903 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
39
40
41
package main
import (
"os"
libhoney "github.com/honeycombio/libhoney-go"
)
// Version will be set by CircleCI based on a git tag and the commit hash
var Version = "dev"
const (
providerTravis = "Travis-CI"
providerCircle = "CircleCI"
providerGitLab = "GitLab-CI"
providerJenkinsX = "Jenkins-X"
providerGoogleCloudBuild = "Google-Cloud-Build"
)
func main() {
defer libhoney.Close()
var config libhoney.Config
var filename string
var ciProvider string
var wcfg watchConfig
root := commandRoot(&config, &filename, &ciProvider)
// Put 'em all together
root.AddCommand(
commandBuild(&config, &filename, &ciProvider),
commandStep(&config, &filename, &ciProvider),
commandCmd(&config, &filename, &ciProvider),
commandWatch(&config, &filename, &ciProvider, &wcfg),
)
// Do the work
if err := root.Execute(); err != nil {
os.Exit(1)
}
}