|
|
@ -154,7 +154,7 @@ func (m *Manager) Build(recursive bool) error {
|
|
|
|
// recursively and perform the update.
|
|
|
|
// recursively and perform the update.
|
|
|
|
func (m *Manager) Update(recursive bool) error {
|
|
|
|
func (m *Manager) Update(recursive bool) error {
|
|
|
|
if recursive {
|
|
|
|
if recursive {
|
|
|
|
depChartPaths, err := m.locateDependencies(m.ChartPath, recursive)
|
|
|
|
depChartPaths, err := m.locateLocalDependencies(m.ChartPath, recursive)
|
|
|
|
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
return err
|
|
|
@ -764,11 +764,11 @@ func (m *Manager) findChartURL(name, version, repoURL string, repos map[string]*
|
|
|
|
return url, username, password, false, false, "", "", "", err
|
|
|
|
return url, username, password, false, false, "", "", "", err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// LocateDependencies locates the dependencies for the given chart (optionally recursively)
|
|
|
|
// locateLocalDependencies locates local dependencies for the given chart (optionally recursively)
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// The returned list of Chart paths is ordered from "leaf to root" so we can issue updates in
|
|
|
|
// The returned list of Chart paths is ordered from "leaf to root" so we can issue updates in
|
|
|
|
// the right order when iterating over this list.
|
|
|
|
// the right order when iterating over this list.
|
|
|
|
func (m *Manager) locateDependencies(baseChartPath string, resursive bool) ([]string, error) {
|
|
|
|
func (m *Manager) locateLocalDependencies(baseChartPath string, resursive bool) ([]string, error) {
|
|
|
|
reversedDeps := []string{}
|
|
|
|
reversedDeps := []string{}
|
|
|
|
|
|
|
|
|
|
|
|
baseChart, err := m.loadChartDir(baseChartPath)
|
|
|
|
baseChart, err := m.loadChartDir(baseChartPath)
|
|
|
@ -780,13 +780,11 @@ func (m *Manager) locateDependencies(baseChartPath string, resursive bool) ([]st
|
|
|
|
for _, chartDependency := range baseChart.Metadata.Dependencies {
|
|
|
|
for _, chartDependency := range baseChart.Metadata.Dependencies {
|
|
|
|
|
|
|
|
|
|
|
|
fullDepChartPath := chartDependency.Repository
|
|
|
|
fullDepChartPath := chartDependency.Repository
|
|
|
|
isLocalChart := false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if strings.HasPrefix(
|
|
|
|
if strings.HasPrefix(
|
|
|
|
chartDependency.Repository,
|
|
|
|
chartDependency.Repository,
|
|
|
|
"file://",
|
|
|
|
"file://",
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
isLocalChart = true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fullDepChartPath, err = filepath.Abs(
|
|
|
|
fullDepChartPath, err = filepath.Abs(
|
|
|
|
fmt.Sprintf(
|
|
|
|
fmt.Sprintf(
|
|
|
@ -797,15 +795,15 @@ func (m *Manager) locateDependencies(baseChartPath string, resursive bool) ([]st
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
reversedDeps = append(
|
|
|
|
reversedDeps = append(
|
|
|
|
[]string{fullDepChartPath},
|
|
|
|
[]string{fullDepChartPath},
|
|
|
|
reversedDeps...,
|
|
|
|
reversedDeps...,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if resursive && isLocalChart {
|
|
|
|
if resursive {
|
|
|
|
subDeps, err := m.locateDependencies(fullDepChartPath, resursive)
|
|
|
|
subDeps, err := m.locateLocalDependencies(fullDepChartPath, resursive)
|
|
|
|
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|