diff --git a/hack/release.sh b/hack/release.sh index 7ed045926c..23a01ee2a4 100644 --- a/hack/release.sh +++ b/hack/release.sh @@ -55,6 +55,16 @@ function set_version_label() { -e "s/(app.kubernetes.io\/version: )\"?${old_version}\"?/\1${operator_version}/g" \ -e "s/(version: )\"?${old_version}\"?/\1${operator_version}/g" \ -e "s/(\"-version\"), \"?${old_version}\"?/\1, ${operator_version}/g" cmd/openshift/operator/kodata/cabundles/*.yaml + + # Update the Helm chart. Chart.yaml's "version" (plain semver, no "v" + # prefix) and "appVersion" (matches the release tag) are the only fields + # that need updating: every templates/*.yaml label is already rendered + # from .Chart.AppVersion. + echo updating charts/tekton-operator/Chart.yaml from version: ${old_version} to version: ${operator_version} + sed -i -E \ + -e "s/^version: \"?${old_version#v}\"?/version: ${operator_version#v}/" \ + -e "s/^appVersion: \"?${old_version}\"?/appVersion: ${operator_version}/" \ + charts/tekton-operator/Chart.yaml } @@ -64,6 +74,7 @@ function commit_changes() { git add -u cmd/ git add -u config/ + git add -u charts/ git commit -m "Freezing Component versions and updating version labels" } diff --git a/tekton/release-cheat-sheet.md b/tekton/release-cheat-sheet.md index dda66ec069..0706bb7e38 100644 --- a/tekton/release-cheat-sheet.md +++ b/tekton/release-cheat-sheet.md @@ -51,20 +51,6 @@ on the shared Tekton infrastructure cluster. curl -s https://infra.tekton.dev/tekton-releases/operator/previous/${TEKTON_RELEASE_VERSION}/openshift-release.yaml | head ``` -1. Update Helm charts with the new version: - - ```bash - # Update labels in YAML files under templates directory - find charts/tekton-operator/templates -type f -name '*.yaml' -exec sed -i \ - "s/operator\.tekton\.dev\/release: \"devel\"/operator.tekton.dev\/release: ${TEKTON_RELEASE_VERSION}/g" {} + - find charts/tekton-operator/templates -type f -name '*.yaml' -exec sed -i \ - "s/version: \"devel\"/version: ${TEKTON_RELEASE_VERSION}/g" {} + - - # Update Chart.yaml - sed -i "s/^version: \"devel\"/version: ${TEKTON_RELEASE_VERSION#v}/" charts/tekton-operator/Chart.yaml - sed -i "s/^appVersion: \"devel\"/appVersion: ${TEKTON_RELEASE_VERSION}/" charts/tekton-operator/Chart.yaml - ``` - ### Patch Release (bugfix) Patch releases can be triggered manually or automatically.