66 "strings"
77
88 "errors"
9+
910 "github.com/databus23/helm-diff/diff"
1011 "github.com/databus23/helm-diff/manifest"
1112 "github.com/spf13/cobra"
@@ -18,6 +19,7 @@ type diffCmd struct {
1819 chartVersion string
1920 client helm.Interface
2021 detailedExitCode bool
22+ devel bool
2123 namespace string // namespace to assume the release to be installed into. Defaults to the current kube config namespace.
2224 valueFiles valueFiles
2325 values []string
@@ -78,6 +80,7 @@ func newChartCommand() *cobra.Command {
7880 f .BoolVar (& diff .reuseValues , "reuse-values" , false , "reuse the last release's values and merge in any new values" )
7981 f .BoolVar (& diff .resetValues , "reset-values" , false , "reset the values to the ones built into the chart and merge in any new values" )
8082 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." )
8184 f .StringArrayVar (& diff .suppressedKinds , "suppress" , []string {}, "allows suppression of the values listed in the diff output" )
8285 f .IntVarP (& diff .outputContext , "context" , "C" , - 1 , "output NUM lines of context around changes" )
8386 f .StringVar (& diff .namespace , "namespace" , "default" , "namespace to assume the release to be installed into" )
@@ -89,6 +92,10 @@ func newChartCommand() *cobra.Command {
8992}
9093
9194func (d * diffCmd ) run () error {
95+ if d .chartVersion == "" && d .devel {
96+ d .chartVersion = ">0.0.0-0"
97+ }
98+
9299 chartPath , err := locateChartPath (d .chart , d .chartVersion , false , "" )
93100 if err != nil {
94101 return err
0 commit comments