Skip to content

Commit

Permalink
ci: ensures release touches at least one file
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <[email protected]>
  • Loading branch information
Adrian Cole committed Feb 21, 2024
1 parent d99c588 commit ce30761
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions build-bin/helm/helm_prepare
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
#

# This script prepares the helm chart for a release by updating the versions in the chart file.
#
# Note: helm/chart-releaser-action silently fails if there is no change made here.
# Hence, we should never update the chart version manually.

trigger_tag=${1?trigger_tag is required. Ex release-1.2.3}
release_version=$(build-bin/git/version_from_trigger_tag release- ${trigger_tag})
Expand All @@ -39,9 +42,7 @@ sh -c "sed -i 's/appVersion\:\s[0-9.]\+/appVersion\: ${latest_app_version}/g' ./
sh -c "sed -i 's/version\:\s[0-9.]\+/version\: ${release_version}/g' ./charts/zipkin/Chart.yaml"

# Commit changes to ./charts/zipkin/Chart.yaml
git add ./charts/zipkin/Chart.yaml
git add ./charts/zipkin/Chart.yaml && git commit -m "release: zipkin-${release_version}"

if git commit -m "release: updates for ${release_version}"; then
# Push the changes in ./charts/zipkin/Chart.yaml to the release branch
git push origin ${release_branch}
fi
# Push the changes in ./charts/zipkin/Chart.yaml to the release branch
git push origin ${release_branch}
2 changes: 1 addition & 1 deletion charts/zipkin/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ appVersion: 3.0.6
name: zipkin
description: A Zipkin helm chart for kubernetes
type: application
version: 0.2.0
version: 0.1.2 # chart version maintained by release automation
maintainers:
- name: openzipkin
email: [email protected]

0 comments on commit ce30761

Please sign in to comment.