mirror of
https://github.com/bazel-contrib/rules_foreign_cc
synced 2024-11-28 08:43:26 +00:00
Update release_prep.sh
Fix TAG name
This commit is contained in:
parent
fa1d617e5e
commit
3a85c822bf
12
.github/workflows/release_prep.sh
vendored
12
.github/workflows/release_prep.sh
vendored
|
@ -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}')
|
||||
|
@ -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
|
||||
|
@ -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 "\`\`\`"
|
||||
|
|
Loading…
Reference in a new issue