Skip to content

Commit 5a276de

Browse files
committed
Instructions for git_override in release notes
1 parent 3e6d4d9 commit 5a276de

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/release_notes_template.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ If you're using `bzlmod`, add the following to `MODULE.bazel`:
55
```starlark
66
bazel_dep(name = "toolchains_llvm", version = "{tag}")
77

8+
# To directly use a commit from GitHub, replace commit with the commit you want.
9+
# Otherwise, omit this block.
10+
git_override(
11+
module_name = "toolchains_llvm",
12+
commit = "{commit}",
13+
remote = "https://github.com/grailbio/bazel-toolchain",
14+
)
15+
16+
# Configure and register the toolchain.
817
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
918
llvm.toolchain(
1019
llvm_version = "16.0.0",

.github/workflows/release_prep.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ git config user.name "Your Name"
77

88
# Set by GH actions, see
99
# https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables
10-
tag=${GITHUB_REF_NAME}
10+
tag="${GITHUB_REF_NAME}"
11+
commit="${GITHUB_SHA}"
1112
# The prefix is chosen to match what GitHub generates for source archives
1213
prefix="toolchains_llvm-${tag}"
1314
archive="toolchains_llvm-${tag}.tar.gz"
@@ -17,6 +18,7 @@ sha=$(shasum -a 256 "${archive}" | cut -f1 -d' ')
1718

1819
sed \
1920
-e "s/{tag}/${tag}/g" \
21+
-e "s/{commit}/${commit}/g" \
2022
-e "s/{prefix}/${prefix}/g" \
2123
-e "s/{archive}/${archive}/g" \
2224
-e "s/{sha}/${sha}/g" \

0 commit comments

Comments
 (0)