Skip to content

Commit 6edc43b

Browse files
authored
Fix release notes template tag. (#393)
The existing release notes template block can't be pasted into a MODULE.bazel because it generates an invalid semver. Strip the leading "v".
1 parent 6d42ca3 commit 6edc43b

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

.github/workflows/release_notes_template.txt

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,7 @@ Minimum bazel version: **7.0.0**
33
If you're using `bzlmod`, add the following to `MODULE.bazel`:
44

55
```starlark
6-
bazel_dep(name = "toolchains_llvm", version = "{tag}")
7-
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/bazel-contrib/toolchains_llvm",
14-
)
6+
bazel_dep(name = "toolchains_llvm", version = "{version}")
157

168
# Configure and register the toolchain.
179
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
@@ -25,6 +17,15 @@ use_repo(llvm, "llvm_toolchain")
2517
register_toolchains("@llvm_toolchain//:all")
2618
```
2719

20+
To directly use a commit from GitHub, add this block and replace commit with the commit you want.
21+
```starlark
22+
git_override(
23+
module_name = "toolchains_llvm",
24+
commit = "{commit}",
25+
remote = "https://github.com/bazel-contrib/toolchains_llvm",
26+
)
27+
```
28+
2829
If not using `bzlmod`, include this section in your `WORKSPACE`:
2930

3031
```starlark

.github/workflows/release_prep.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ sed -i.bak "s/0.0.0/${tag}/" MODULE.bazel && git add MODULE.bazel && git commit
1616
git archive --format=tar --prefix="${prefix}/" HEAD | gzip >"${archive}"
1717
sha=$(shasum -a 256 "${archive}" | cut -f1 -d' ')
1818

19+
# Strip leading "v" from the tag if present to create the semver version.
1920
sed \
21+
-e "s/{version}/${tag#v}/g" \
2022
-e "s/{tag}/${tag}/g" \
2123
-e "s/{commit}/${commit}/g" \
2224
-e "s/{prefix}/${prefix}/g" \

0 commit comments

Comments
 (0)