parent
f79db2ec8d
commit
9d851cda3b
8
main.go
8
main.go
|
|
@ -115,6 +115,10 @@ func main() {
|
||||||
Value: "",
|
Value: "",
|
||||||
Usage: "pass args to helm exec",
|
Usage: "pass args to helm exec",
|
||||||
},
|
},
|
||||||
|
cli.BoolFlag{
|
||||||
|
Name: "skip-repos",
|
||||||
|
Usage: "skip running `helm repo update` before running `helm dependency build`",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Action: action(func(run *app.App, c configImpl) error {
|
Action: action(func(run *app.App, c configImpl) error {
|
||||||
return run.Deps(c)
|
return run.Deps(c)
|
||||||
|
|
@ -495,6 +499,10 @@ func (c configImpl) Set() []string {
|
||||||
return c.c.StringSlice("set")
|
return c.c.StringSlice("set")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c configImpl) SkipRepos() bool {
|
||||||
|
return c.c.Bool("skip-repos")
|
||||||
|
}
|
||||||
|
|
||||||
func (c configImpl) Values() []string {
|
func (c configImpl) Values() []string {
|
||||||
return c.c.StringSlice("values")
|
return c.c.StringSlice("values")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ type DeprecatedChartsConfigProvider interface {
|
||||||
|
|
||||||
type DepsConfigProvider interface {
|
type DepsConfigProvider interface {
|
||||||
Args() string
|
Args() string
|
||||||
|
SkipRepos() bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type ReposConfigProvider interface {
|
type ReposConfigProvider interface {
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,10 @@ func (r *Run) askForConfirmation(msg string) bool {
|
||||||
func (r *Run) Deps(c DepsConfigProvider) []error {
|
func (r *Run) Deps(c DepsConfigProvider) []error {
|
||||||
r.helm.SetExtraArgs(argparser.GetArgs(c.Args(), r.state)...)
|
r.helm.SetExtraArgs(argparser.GetArgs(c.Args(), r.state)...)
|
||||||
|
|
||||||
if errs := r.ctx.SyncReposOnce(r.state, r.helm); errs != nil && len(errs) > 0 {
|
if !c.SkipRepos() {
|
||||||
return errs
|
if errs := r.ctx.SyncReposOnce(r.state, r.helm); errs != nil && len(errs) > 0 {
|
||||||
|
return errs
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return r.state.UpdateDeps(r.helm)
|
return r.state.UpdateDeps(r.helm)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue