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
valueFiles valueFiles
22
24
values []string
23
25
reuseValues bool
@@ -75,6 +77,7 @@ func newChartCommand() *cobra.Command {
75
77
f .BoolVar (& diff .reuseValues , "reuse-values" , false , "reuse the last release's values and merge in any new values" )
76
78
f .BoolVar (& diff .resetValues , "reset-values" , false , "reset the values to the ones built into the chart and merge in any new values" )
77
79
f .BoolVar (& diff .allowUnreleased , "allow-unreleased" , false , "enables diffing of releases that are not yet deployed via Helm" )
80
+ f .BoolVar (& diff .devel , "devel" , false , "use development versions, too. Equivalent to version '>0.0.0-0'. If --version is set, this is ignored." )
78
81
f .StringArrayVar (& diff .suppressedKinds , "suppress" , []string {}, "allows suppression of the values listed in the diff output" )
79
82
f .IntVarP (& diff .outputContext , "context" , "C" , - 1 , "output NUM lines of context around changes" )
80
83
@@ -85,6 +88,10 @@ func newChartCommand() *cobra.Command {
85
88
}
86
89
87
90
func (d * diffCmd ) run () error {
91
+ if d .chartVersion == "" && d .devel {
92
+ d .chartVersion = ">0.0.0-0"
93
+ }
94
+
88
95
chartPath , err := locateChartPath (d .chart , d .chartVersion , false , "" )
89
96
if err != nil {
90
97
return err
0 commit comments