feat: mark deprecated args and cmd for v1 (#628)

* feat: mark deprecated args and cmd for v1

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2023-01-14 23:43:05 +08:00
committed by GitHub
parent db5c2a52d6
commit 8d96bbb0e4
16 changed files with 65 additions and 25 deletions
+1 -1
View File
@@ -42,8 +42,8 @@ func NewApplyCmd(globalCfg *config.GlobalImpl) *cobra.Command {
f.BoolVar(&applyOptions.DetailedExitcode, "detailed-exitcode", false, "return a non-zero exit code 2 instead of 0 when there were changes detected AND the changes are synced successfully")
f.StringVar(&globalCfg.GlobalOptions.Args, "args", "", "pass args to helm exec")
if !runtime.V1Mode {
// TODO: Remove this function once Helmfile v0.x
f.BoolVar(&applyOptions.RetainValuesFiles, "retain-values-files", false, "DEPRECATED: Use skip-cleanup instead")
// mark retain-values-files as deprecated, but keep it for backward compatibility, will be removed in the future
_ = f.MarkDeprecated("retain-values-files", "Use skip-cleanup instead")
}
+1
View File
@@ -1,3 +1,4 @@
// TODO: Remove this function once Helmfile v0.x
package cmd
import (
+1
View File
@@ -1,3 +1,4 @@
// TODO: Remove this function once Helmfile v0.x
package cmd
import (
+1
View File
@@ -103,6 +103,7 @@ func NewRootCmd(globalConfig *config.GlobalOptions) (*cobra.Command, error) {
),
)
// TODO: Remove this function once Helmfile v0.x
if !runtime.V1Mode {
cmd.AddCommand(
NewChartsCmd(globalImpl),