Skip to content

Commit c4133ab

Browse files
hvadehrarules_java Copybara
authored andcommitted
Get the last tag at HEAD~1 for generating release notes
Now that we're relying on a tag push for making releases, the latest tag at HEAD is the release we're currently making, and we want the previous tag. (in the earlier release process, we generated the release notes *before* creating the tag) (ignore-relnotes) PiperOrigin-RevId: 874468315 Change-Id: I1deb413ff6db4803f6c2eaf51da80c287ca78183
1 parent 7ba5fec commit c4133ab

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.bazelci/presubmit.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ tasks:
9595
- "git commit --allow-empty -m 'Fake init commit'"
9696
- "git tag -a 'fake-tag-for-testing' -m 'ignore'"
9797
- "git commit --allow-empty -m 'Fake commit message for testing'"
98+
- "git tag -a 'fake-tag-for-testing2' -m 'ignore'"
9899
test_targets:
99100
- "//test:check_remote_jdk_configs_test"
100101
- "//test:check_remote_java_tools_configs_test"

distro/relnotes.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def print_rel_notes(*, name, version, archive):
55
name = name,
66
outs = [name + ".txt"],
77
cmd = """
8-
last_rel=$$(git describe --tags --abbrev=0)
8+
last_rel=$$(git describe --tags --abbrev=0 HEAD~1)
99
changelog=$$(/usr/bin/git log tags/$$last_rel..HEAD --format=oneline --invert-grep --grep 'ignore-relnotes' --)
1010
sha=$$(/usr/bin/sha256sum $(SRCS) | cut -d ' ' -f1)
1111
cat > $@ <<EOF

0 commit comments

Comments
 (0)