2016-04-20 03:37:53 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"github.com/drone/drone/drone/agent"
|
|
|
|
"github.com/drone/drone/version"
|
|
|
|
|
|
|
|
"github.com/codegangsta/cli"
|
|
|
|
"github.com/ianschenck/envflag"
|
|
|
|
_ "github.com/joho/godotenv/autoload"
|
|
|
|
)
|
|
|
|
|
2016-04-28 23:10:32 +02:00
|
|
|
func main() {
|
2016-04-20 03:37:53 +02:00
|
|
|
envflag.Parse()
|
|
|
|
|
|
|
|
app := cli.NewApp()
|
|
|
|
app.Name = "drone"
|
|
|
|
app.Version = version.Version
|
|
|
|
app.Usage = "command line utility"
|
2016-04-23 13:27:28 +02:00
|
|
|
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",
|
|
|
|
},
|
|
|
|
}
|
2016-04-20 03:37:53 +02:00
|
|
|
app.Commands = []cli.Command{
|
|
|
|
agent.AgentCmd,
|
2016-05-12 03:43:24 +02:00
|
|
|
agentsCmd,
|
2016-05-06 19:59:36 +02:00
|
|
|
buildCmd,
|
|
|
|
deployCmd,
|
2016-05-10 07:57:57 +02:00
|
|
|
execCmd,
|
2016-05-06 19:59:36 +02:00
|
|
|
infoCmd,
|
|
|
|
secretCmd,
|
|
|
|
serverCmd,
|
|
|
|
signCmd,
|
|
|
|
repoCmd,
|
|
|
|
userCmd,
|
2016-07-31 22:09:55 +02:00
|
|
|
orgCmd,
|
2016-10-20 02:13:21 +02:00
|
|
|
globalCmd,
|
2016-04-20 03:37:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
app.Run(os.Args)
|
|
|
|
}
|