Skip to content

Commit

Permalink
Update release_prep.sh
Browse files Browse the repository at this point in the history
Fix TAG name
  • Loading branch information
jsharpe authored Oct 25, 2023
1 parent fa1d617 commit 3a85c82
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/release_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -o errexit -o nounset -o pipefail
# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
TAG=${GITHUB_REF_NAME}
# The prefix is chosen to match what GitHub generates for source archives
PREFIX="rules_foreign_cc-${TAG:1}"
PREFIX="rules_foreign_cc-${TAG}"
ARCHIVE="rules_foreign_cc-$TAG.tar.gz"
git archive --format=tar --prefix=${PREFIX}/ ${TAG} | gzip > $ARCHIVE
SHA=$(shasum -a 256 $ARCHIVE | awk '{print $1}')
Expand All @@ -18,7 +18,7 @@ cat << EOF
2. Add to your \`MODULE.bazel\` file:
\`\`\`starlark
bazel_dep(name = "rules_foreign_cc", version = "${TAG:1}")
bazel_dep(name = "rules_foreign_cc", version = "${TAG}")
\`\`\`
## Using WORKSPACE
Expand All @@ -33,8 +33,14 @@ http_archive(
strip_prefix = "${PREFIX}",
url = "https://github.com/bazelbuild/rules_foreign_cc/releases/download/${TAG}/${ARCHIVE}",
)
load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
# This sets up some common toolchains for building targets. For more details, please see
# https://bazelbuild.github.io/rules_foreign_cc/${TAG}/flatten.html#rules_foreign_cc_dependencies
rules_foreign_cc_dependencies()
EOF

# TODO: add example of how to configure for both bzlmod and WORKSPACE
# TODO: add example of how to configure for bzlmod
# awk 'f;/--SNIP--/{f=1}' e2e/smoke/WORKSPACE.bazel
echo "\`\`\`"

0 comments on commit 3a85c82

Please sign in to comment.