Description
Add option to skip upgrade check via env variable. It should be done via option, so such thing:
// when set environment HELMFILE_UPGRADE_NOTICE_DISABLED any value, skip upgrade notice.
var versionOpts []extension.CobraOption
if os.Getenv("HELMFILE_UPGRADE_NOTICE_DISABLED") == "" {
versionOpts = append(versionOpts, extension.WithUpgradeNotice("helmfile", "helmfile"))
}
// ...
extension.NewVersionCobraCmd(
versionOpts...,
),
can be optimized to:
extension.NewVersionCobraCmd(
extension.WithUpgradeNotice("helmfile", "helmfile",
upgrade.WithSkipOnEnv("HELMFILE_UPGRADE_NOTICE_DISABLED"),
),
)
By default, setting below envs to any value should also disable the update check:
{CLI_NAME}_NO_UPDATE_NOTIFIER - matches the gh CLI style
{CLI_NAME}_UPGRADE_NOTICE_DISABLED - matches the helmfile style
See the helmfile usage: helmfile/helmfile#412
Reasons
Enhance UX
Description
Add option to skip upgrade check via env variable. It should be done via option, so such thing:
can be optimized to:
By default, setting below envs to any value should also disable the update check:
{CLI_NAME}_NO_UPDATE_NOTIFIER- matches theghCLI style{CLI_NAME}_UPGRADE_NOTICE_DISABLED- matches the helmfile styleSee the
helmfileusage: helmfile/helmfile#412Reasons
Enhance UX