woodpecker/drone/drone.go

44 lines
724 B
Go
Raw Normal View History

2016-04-20 01:37:53 +00: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"
)
func main() {
2016-04-20 01:37:53 +00:00
envflag.Parse()
app := cli.NewApp()
app.Name = "drone"
app.Version = version.Version
app.Usage = "command line utility"
2016-04-23 11:27:28 +00:00
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",
},
}
2016-04-20 01:37:53 +00:00
app.Commands = []cli.Command{
agent.AgentCmd,
2016-04-29 19:39:56 +00:00
DaemonCmd,
2016-04-23 11:27:28 +00:00
SignCmd,
SecretCmd,
2016-04-20 01:37:53 +00:00
}
app.Run(os.Args)
}