Skip to content

Commit 28e7687

Browse files
hvadehrarules_java Copybara
authored andcommitted
Work around the shallow checkout behavior of release_ruleset.yaml[^1]
We need the full history of commits and tags to generate release notes. [^1]: While https://github.com/actions/checkout/blob/main/action.yml supports deep checkouts, we can't pass parameters to it unless https://github.com/bazel-contrib/.github/blob/master/.github/workflows/release_ruleset.yaml exposes a parameter for it. (ignore-relnotes) PiperOrigin-RevId: 874550299 Change-Id: I498f09063adaebb0d0709f1cebdfc9b0067215ae
1 parent 3d5ea24 commit 28e7687

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

distro/relnotes.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ def print_rel_notes(*, name, version, archive):
55
name = name,
66
outs = [name + ".txt"],
77
cmd = """
8+
[ "$$(/usr/bin/git rev-parse --is-shallow-repository)" == "true" ] && /usr/bin/git fetch --unshallow
89
last_rel=$$(git describe --tags --abbrev=0 HEAD~1)
910
changelog=$$(/usr/bin/git log tags/$$last_rel..HEAD --format=oneline --invert-grep --grep 'ignore-relnotes' --)
1011
sha=$$(/usr/bin/sha256sum $(SRCS) | cut -d ' ' -f1)

0 commit comments

Comments
 (0)