Skip to content

Commit

Permalink
Use the correct helm chart version when creating GH release (#54)
Browse files Browse the repository at this point in the history
Similar to #53, now that the Helm chart version is different from the release version, we need to use the Helm chart version when generating checksums to upload to the releases page during a release.

Signed-off-by: Alex Leong <[email protected]>
  • Loading branch information
adleong authored May 8, 2023
1 parent b400206 commit 74925a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
path: build-archives
- name: Generate SHA256SUMS
run: |
./bin/generate-sha256sums $TAG
./bin/generate-sha256sums $TAG $CHART_VERSION
- id: set-env
run: echo "::set-output name=tag::$(echo $TAG)"
- name: Create release
Expand Down
9 changes: 5 additions & 4 deletions bin/generate-sha256sums
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

set -eu

if [ $# -eq 1 ]; then
if [ $# -eq 2 ]; then
tag=${1:-}
chart_version=${2:-}
else
echo "usage: ${0##*/} tag" >&2
echo "usage: ${0##*/} tag chart_version" >&2
exit 64
fi

Expand All @@ -25,5 +26,5 @@ for os in $OS; do
done

# generate for helm chart
cp build-archives/helm/linkerd-smi-"$shorttag".tgz ./target/release
openssl dgst -sha256 ./target/release/linkerd-smi-"$shorttag".tgz | awk '{print $2}' > "./target/release/linkerd-smi-$shorttag.tgz.sha256"
cp build-archives/helm/linkerd-smi-"$chart_version".tgz ./target/release
openssl dgst -sha256 ./target/release/linkerd-smi-"$chart_version".tgz | awk '{print $2}' > "./target/release/linkerd-smi-$chart_version.tgz.sha256"

0 comments on commit 74925a9

Please sign in to comment.