Skip to content

Commit

Permalink
Ensure that the release workflow generates correct release notes (#102)
Browse files Browse the repository at this point in the history
While I'm not convinced we're calculating the SHA256 correctly,
the URL and the `strip_prefix` are now better.
  • Loading branch information
shs96c authored Oct 21, 2022
1 parent ffadd1a commit 5abc62b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/workspace_snippet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eufo pipefail
# Set by GH actions, see
# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
TAG=${GITHUB_REF_NAME}
PREFIX="contrib_rules_jvm-${TAG:1}"
PREFIX="rules_jvm-${TAG:1}"
SHA=$(git archive --format=tar --prefix=${PREFIX}/ ${TAG} | gzip | shasum -a 256 | awk '{print $1}')

cat << EOF
Expand All @@ -15,7 +15,7 @@ http_archive(
name = "contrib_rules_jvm",
sha256 = "${SHA}",
strip_prefix = "${PREFIX}",
url = "https://github.com/bazel-contrib/contrib_rules_jvm/archive/${TAG}.tar.gz",
url = "https://github.com/bazel-contrib/rules_jvm/archive/refs/tags/${TAG}.tar.gz",
)
# Fetches the contrib_rules_jvm dependencies.
Expand Down

0 comments on commit 5abc62b

Please sign in to comment.