mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 04:06:54 +00:00
moved cmd to cli folder
This commit is contained in:
45
cli/main.go
Normal file
45
cli/main.go
Normal file
@@ -0,0 +1,45 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/codegangsta/cli"
|
||||
"os"
|
||||
)
|
||||
|
||||
var (
|
||||
// commit sha for the current build.
|
||||
version string = "0.3-dev"
|
||||
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(),
|
||||
}
|
||||
|
||||
app.Run(os.Args)
|
||||
}
|
Reference in New Issue
Block a user