This repository has been archived by the owner on Nov 1, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #490 from fluxcd/bugfix/issue-469
Fix: prevent spurious upgrades for semver ranges
- Loading branch information
Showing
4 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package v2 | ||
|
||
import ( | ||
"fmt" | ||
|
||
"k8s.io/helm/pkg/chartutil" | ||
) | ||
|
||
func (h *HelmV2) GetChartRevision(chartPath string) (string, error) { | ||
chartRequested, err := chartutil.Load(chartPath) | ||
if err != nil { | ||
return "", fmt.Errorf("failed to load chart to determine revision: %w", err) | ||
} | ||
return chartRequested.Metadata.Version, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package v3 | ||
|
||
import ( | ||
"fmt" | ||
|
||
"helm.sh/helm/v3/pkg/chart/loader" | ||
) | ||
|
||
func (h *HelmV3) GetChartRevision(chartPath string) (string, error) { | ||
chartRequested, err := loader.Load(chartPath) | ||
if err != nil { | ||
return "", fmt.Errorf("failed to load chart to determine revision: %w", err) | ||
} | ||
return chartRequested.Metadata.Version, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters