Skip to content

Commit fea8522

Browse files
committed
Use make target to bump version in helm chart
1 parent d2f53d7 commit fea8522

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

pkg/cmd/release/update_helm.go

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,14 @@ import (
1313

1414
// updateHelm runs commands in the helm-charts repo in order to update the cockroachdb version.
1515
func updateHelm(workDir string, version string) error {
16-
commands := []*exec.Cmd{
17-
exec.Command("bazel", "build", "//build"),
18-
// Helm charts use the version without the "v" prefix, but the bumper trims it if present.
19-
exec.Command("sh", "-c", fmt.Sprintf("$(bazel info bazel-bin)/build/build_/build bump %s", version)),
20-
}
21-
for _, cmd := range commands {
22-
cmd.Dir = workDir
23-
out, err := cmd.CombinedOutput()
24-
if err != nil {
25-
return fmt.Errorf("failed running '%s' with message '%s': %w", cmd.String(), string(out), err)
26-
}
27-
log.Printf("ran '%s': %s\n", cmd.String(), string(out))
16+
// Helm charts use the version without the "v" prefix, but the bumper trims it if present.
17+
cmd := exec.Command("sh", "-c", fmt.Sprintf("make bump/%s", version))
18+
cmd.Dir = workDir
19+
out, err := cmd.CombinedOutput()
20+
if err != nil {
21+
return fmt.Errorf("failed running '%s' with message '%s': %w", cmd.String(), string(out), err)
2822
}
23+
log.Printf("ran '%s': %s\n", cmd.String(), string(out))
24+
2925
return nil
3026
}

0 commit comments

Comments
 (0)