Cli updater (#3382)

This commit is contained in:
Anbraten
2024-02-19 09:16:27 +01:00
committed by GitHub
parent 99037b2d97
commit 30b92edc99
7 changed files with 361 additions and 2 deletions

View File

@@ -29,6 +29,7 @@ import (
"go.woodpecker-ci.org/woodpecker/v2/cli/registry"
"go.woodpecker-ci.org/woodpecker/v2/cli/repo"
"go.woodpecker-ci.org/woodpecker/v2/cli/secret"
"go.woodpecker-ci.org/woodpecker/v2/cli/update"
"go.woodpecker-ci.org/woodpecker/v2/cli/user"
"go.woodpecker-ci.org/woodpecker/v2/version"
)
@@ -37,11 +38,13 @@ import (
func newApp() *cli.App {
app := cli.NewApp()
app.Name = "woodpecker-cli"
app.Description = "Woodpecker command line utility"
app.Version = version.String()
app.Usage = "command line utility"
app.EnableBashCompletion = true
app.Flags = common.GlobalFlags
app.Before = common.SetupGlobalLogger
app.Before = common.Before
app.After = common.After
app.Suggest = true
app.Commands = []*cli.Command{
pipeline.Command,
log.Command,
@@ -55,6 +58,7 @@ func newApp() *cli.App {
lint.Command,
loglevel.Command,
cron.Command,
update.Command,
}
return app