mirror of
https://github.com/drone/drone-cli.git
synced 2024-11-26 06:07:05 +01:00
46 lines
652 B
Go
46 lines
652 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{
|
|
BuildCmd,
|
|
RepoCmd,
|
|
ExecCmd,
|
|
MachineCmd,
|
|
SecureCmd,
|
|
UserCmd,
|
|
}
|
|
|
|
app.Run(os.Args)
|
|
}
|