-
Notifications
You must be signed in to change notification settings - Fork 37
/
main.go
46 lines (38 loc) · 1.09 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
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"
providerBuildkite = "Buildkite"
providerJenkinsX = "Jenkins-X"
providerGoogleCloudBuild = "Google-Cloud-Build"
providerAzurePipelines = "Azure-Pipelines"
providerGitHubActions = "GitHub-Actions"
providerBitbucketPipelines = "Bitbucket-Pipelines"
)
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 {
libhoney.Close()
os.Exit(1)
}
}