1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-12 08:23:48 +02:00
woodpecker/cli/main.go
2015-02-04 14:42:24 +01:00

49 lines
778 B
Go

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)
}