forked from harness/harness
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
48 lines (42 loc) · 778 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
42
43
44
45
46
47
48
package main
import (
"os"
"github.com/codegangsta/cli"
)
var (
// commit sha for the current build.
version string
revision string
)
func main() {
app := cli.NewApp()
app.Name = "drone"
app.Version = version
app.Usage = "command line utility"
app.Flags = []cli.Flag{
cli.StringFlag{
Name: "t, token",
Value: "",
Usage: "server auth token",
EnvVar: "DRONE_TOKEN",
},
cli.StringFlag{
Name: "s, server",
Value: "",
Usage: "server location",
EnvVar: "DRONE_SERVER",
},
}
app.Commands = []cli.Command{
NewBuildCommand(),
NewReposCommand(),
NewStatusCommand(),
NewEnableCommand(),
NewDisableCommand(),
NewRestartCommand(),
NewWhoamiCommand(),
NewSetKeyCommand(),
NewDeleteCommand(),
}
app.Run(os.Args)
}