@@ -41,12 +41,15 @@ var (
4141 info = termcolor .ColorInfo
4242
4343 cmdLong = templates .LongDesc (`
44- Generate the kubernetes resources from a helm chart
44+ Build and push the helm charts in the charts folder
4545` )
4646
4747 cmdExample = templates .Examples (`
48- # generates the resources from a helm chart
49- %s step helm template
48+ # Performs a release of all the charts in the charts folder
49+ %s helm release
50+
51+ # Performs a release of a specific chart in the charts folder
52+ %[1]s helm release myapp
5053 ` )
5154
5255 defaultReadMe = `
@@ -113,8 +116,8 @@ func NewCmdHelmRelease() (*cobra.Command, *Options) {
113116 Short : "Performs a release of all the charts in the charts folder" ,
114117 Long : cmdLong ,
115118 Example : fmt .Sprintf (cmdExample , rootcmd .BinaryName ),
116- Run : func (_ * cobra.Command , _ []string ) {
117- err := o .Run ()
119+ Run : func (_ * cobra.Command , args []string ) {
120+ err := o .Run (args ... )
118121 helper .CheckErr (err )
119122 },
120123 }
@@ -248,7 +251,7 @@ func (o *Options) Validate() error {
248251}
249252
250253// Run implements the command
251- func (o * Options ) Run () error {
254+ func (o * Options ) Run (includeRepos ... string ) error {
252255 err := o .Validate ()
253256 if err != nil {
254257 return errors .Wrapf (err , "failed to validate" )
@@ -283,7 +286,7 @@ func (o *Options) Run() error {
283286 continue
284287 }
285288
286- if stringhelpers .StringArrayIndex ( o .IgnoreChartNames , name ) >= 0 {
289+ if ! stringhelpers .StringContainsAny ( name , includeRepos , o .IgnoreChartNames ) {
287290 log .Logger ().Infof ("not releasing chart %s" , info (name ))
288291 continue
289292 }
0 commit comments