Closed amisevsk closed 3 months ago
Is it possible to print the new release note after the output of the command? Is that a better experience?
We could potentially put it in postRun
, but in my experience most applications print update notifications at the top before showing you the output you want. We don't want to be intrusive.
Description
Show an update notification in the CLI if a newer version is available on GitHub:
Notifications can be disabled by running
kit version --show-update-notifications=false
(use=true
to re-enable).Errors in checking for an update are delegated to debug-level logs and not shown to the user by default.
To test this PR, you will need to build kit with at least
-ldflags="-s -w -X kitops/pkg/lib/constants.Version=${version}"
Note: I had to put the enable/disable flag under the version subcommand, as trying to include it in the root command would either not run it or would break the default help text.
Linked issues
Closes #365