Keep the old Build signature in order to not break the public API

Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>
pull/4468/head
Cosmin Cojocar 7 years ago
parent 364b4e0677
commit ce461733d3

@ -87,6 +87,5 @@ func (d *dependencyBuildCmd) run() error {
if d.recursive {
return man.BuildRecursively()
}
_, err := man.Build()
return err
return man.Build()
}

@ -66,7 +66,12 @@ type Manager struct {
// If the lockfile is not present, this will run a Manager.Update()
//
// If SkipUpdate is set, this will not update the repository.
func (m *Manager) Build() ([]*chartutil.Dependency, error) {
func (m *Manager) Build() error {
_, err := m.build()
return err
}
func (m *Manager) build() ([]*chartutil.Dependency, error) {
c, err := m.loadChartDir()
if err != nil {
return nil, err
@ -121,7 +126,7 @@ func (m *Manager) Build() ([]*chartutil.Dependency, error) {
// If SkipUpdate is set, this will not update the repository.
func (m *Manager) BuildRecursively() error {
// Build the main chart
dependencies, err := m.Build()
dependencies, err := m.build()
if err != nil {
return err
}
@ -152,7 +157,7 @@ func (m *Manager) BuildRecursively() error {
for _, dep := range currChartDep.deps {
chartPath := filepath.Join(currChartDep.path, dep.Name)
m.ChartPath = chartPath
newDeps, err := m.Build()
newDeps, err := m.build()
if err != nil {
return err
}

Loading…
Cancel
Save