Unify cli commands and flags (#4481)

- Unify command and flag descriptions
- Unify logs
- Rename `woodpecker-cli [registry|ssecret|...] info` commands to `woodpecker-cli [registry|ssecret|...] show`
This commit is contained in:
Robert Kaussow
2024-11-30 15:23:44 +01:00
committed by GitHub
parent 9a8d7d8838
commit 57e7572b6f
43 changed files with 119 additions and 118 deletions

View File

@@ -24,7 +24,7 @@ var Command = &cli.Command{
}
func update(ctx context.Context, c *cli.Command) error {
log.Info().Msg("Checking for updates ...")
log.Info().Msg("checking for updates ...")
newVersion, err := CheckForUpdate(ctx, c.Bool("force"))
if err != nil {
@@ -32,11 +32,11 @@ func update(ctx context.Context, c *cli.Command) error {
}
if newVersion == nil {
fmt.Println("You are using the latest version of woodpecker-cli")
fmt.Println("you are using the latest version of woodpecker-cli")
return nil
}
log.Info().Msgf("New version %s is available! Updating ...", newVersion.Version)
log.Info().Msgf("new version %s is available! Updating ...", newVersion.Version)
var tarFilePath string
tarFilePath, err = downloadNewVersion(ctx, newVersion.AssetURL)
@@ -44,14 +44,14 @@ func update(ctx context.Context, c *cli.Command) error {
return err
}
log.Debug().Msgf("New version %s has been downloaded successfully! Installing ...", newVersion.Version)
log.Debug().Msgf("new version %s has been downloaded successfully! Installing ...", newVersion.Version)
binFile, err := extractNewVersion(tarFilePath)
if err != nil {
return err
}
log.Debug().Msgf("New version %s has been extracted to %s", newVersion.Version, binFile)
log.Debug().Msgf("new version %s has been extracted to %s", newVersion.Version, binFile)
executablePathOrSymlink, err := os.Executable()
if err != nil {