6
6
"strings"
7
7
8
8
"errors"
9
+
9
10
"github.com/databus23/helm-diff/diff"
10
11
"github.com/databus23/helm-diff/manifest"
11
12
"github.com/spf13/cobra"
@@ -18,6 +19,7 @@ type diffCmd struct {
18
19
chartVersion string
19
20
client helm.Interface
20
21
detailedExitCode bool
22
+ devel bool
21
23
namespace string // namespace to assume the release to be installed into. Defaults to the current kube config namespace.
22
24
valueFiles valueFiles
23
25
values []string
@@ -78,6 +80,7 @@ func newChartCommand() *cobra.Command {
78
80
f .BoolVar (& diff .reuseValues , "reuse-values" , false , "reuse the last release's values and merge in any new values" )
79
81
f .BoolVar (& diff .resetValues , "reset-values" , false , "reset the values to the ones built into the chart and merge in any new values" )
80
82
f .BoolVar (& diff .allowUnreleased , "allow-unreleased" , false , "enables diffing of releases that are not yet deployed via Helm" )
83
+ f .BoolVar (& diff .devel , "devel" , false , "use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored." )
81
84
f .StringArrayVar (& diff .suppressedKinds , "suppress" , []string {}, "allows suppression of the values listed in the diff output" )
82
85
f .IntVarP (& diff .outputContext , "context" , "C" , - 1 , "output NUM lines of context around changes" )
83
86
f .StringVar (& diff .namespace , "namespace" , "default" , "namespace to assume the release to be installed into" )
@@ -89,6 +92,10 @@ func newChartCommand() *cobra.Command {
89
92
}
90
93
91
94
func (d * diffCmd ) run () error {
95
+ if d .chartVersion == "" && d .devel {
96
+ d .chartVersion = ">0.0.0-0"
97
+ }
98
+
92
99
chartPath , err := locateChartPath (d .chart , d .chartVersion , false , "" )
93
100
if err != nil {
94
101
return err
0 commit comments