Skip to content

Commit

Permalink
Fix error handling in updateChartVersion function for better clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
qjoly committed Dec 20, 2024
1 parent f9271bf commit fb1af7e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions hack/update_after_renovate.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,15 @@ func updateChartVersion(chartName string, isGitHubAction bool) error {
dec = yaml.NewDecoder(f)
dec.Decode(&y)

appVersion, err2 := dig_yaml.DigYaml(y, "common", "image", "tag")
if err2 != nil {
appVersion, err := dig_yaml.DigYaml(y, "common", "image", "tag")
if err != nil {
fmt.Println("Can't read tag")
log.Fatal(err2)
return err
}
appVersion = fmt.Sprintf("%v", appVersion)

if appVersion == chartVersion {
fmt.Println("✔️ Versions are identicals.")
// os.Exit(0)
} else {
fmt.Printf("✖️ Versions in 'Chart.yaml'(%s) and 'values.yaml'(%s) are differents.\n", chartVersion, appVersion)

Expand Down

0 comments on commit fb1af7e

Please sign in to comment.