mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-09 12:05:38 +00:00
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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user