-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.go
58 lines (52 loc) · 1.06 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
57
58
package main
import (
"log"
"os"
"github.com/fixate/drone-secrets/apply"
"github.com/urfave/cli"
)
const version string = "0.0.5"
func main() {
app := cli.NewApp()
app.Name = "drone secret"
app.Version = version
app.Usage = "Apply secret manifests to your drone server"
app.EnableBashCompletion = true
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "t, token",
Usage: "server auth token",
EnvVar: "DRONE_TOKEN",
},
cli.StringFlag{
Name: "s, server",
Usage: "server location",
EnvVar: "DRONE_SERVER",
},
cli.BoolFlag{
Name: "skip-verify",
Usage: "skip ssl verfification",
EnvVar: "DRONE_SKIP_VERIFY",
Hidden: true,
},
cli.StringFlag{
Name: "socks-proxy",
Usage: "socks proxy address",
EnvVar: "SOCKS_PROXY",
Hidden: true,
},
cli.BoolFlag{
Name: "socks-proxy-off",
Usage: "socks proxy ignored",
EnvVar: "SOCKS_PROXY_OFF",
Hidden: true,
},
}
app.Commands = []cli.Command{
apply.Command,
}
if err := app.Run(os.Args); err != nil {
log.Println("Fatal Error")
log.Fatal(err)
}
}