Merge pull request #441 from helmfile/move_upgrade_notice_env_into_envvar
This commit is contained in:
commit
f2be4861d5
|
|
@ -12,6 +12,7 @@ import (
|
||||||
"github.com/helmfile/helmfile/pkg/app"
|
"github.com/helmfile/helmfile/pkg/app"
|
||||||
"github.com/helmfile/helmfile/pkg/app/version"
|
"github.com/helmfile/helmfile/pkg/app/version"
|
||||||
"github.com/helmfile/helmfile/pkg/config"
|
"github.com/helmfile/helmfile/pkg/config"
|
||||||
|
"github.com/helmfile/helmfile/pkg/envvar"
|
||||||
"github.com/helmfile/helmfile/pkg/errors"
|
"github.com/helmfile/helmfile/pkg/errors"
|
||||||
"github.com/helmfile/helmfile/pkg/helmexec"
|
"github.com/helmfile/helmfile/pkg/helmexec"
|
||||||
)
|
)
|
||||||
|
|
@ -75,7 +76,7 @@ func NewRootCmd(globalConfig *config.GlobalOptions, args []string) (*cobra.Comma
|
||||||
|
|
||||||
// when set environment HELMFILE_UPGRADE_NOTICE_DISABLED any value, skip upgrade notice.
|
// when set environment HELMFILE_UPGRADE_NOTICE_DISABLED any value, skip upgrade notice.
|
||||||
var versionOpts []extension.CobraOption
|
var versionOpts []extension.CobraOption
|
||||||
if os.Getenv("HELMFILE_UPGRADE_NOTICE_DISABLED") == "" {
|
if os.Getenv(envvar.UpgradeNoticeDisabled) == "" {
|
||||||
versionOpts = append(versionOpts, extension.WithUpgradeNotice("helmfile", "helmfile"))
|
versionOpts = append(versionOpts, extension.WithUpgradeNotice("helmfile", "helmfile"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,3 +6,4 @@ const Experimental = "HELMFILE_EXPERIMENTAL" // environment variable for experim
|
||||||
const Environment = "HELMFILE_ENVIRONMENT"
|
const Environment = "HELMFILE_ENVIRONMENT"
|
||||||
const TempDir = "HELMFILE_TEMPDIR"
|
const TempDir = "HELMFILE_TEMPDIR"
|
||||||
const Helm3 = "HELMFILE_HELM3"
|
const Helm3 = "HELMFILE_HELM3"
|
||||||
|
const UpgradeNoticeDisabled = "HELMFILE_UPGRADE_NOTICE_DISABLED"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue