Marcel Hlopko has uploaded this change for review.
Do not put PiperOrigin-RevId tak into relnotes
Change-Id: If79da71d2939517724d92cbe470173b5d68e3019
---
M scripts/release/relnotes.sh
M scripts/release/relnotes_test.sh
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/scripts/release/relnotes.sh b/scripts/release/relnotes.sh
index aed0b5c..817ea62 100755
--- a/scripts/release/relnotes.sh
+++ b/scripts/release/relnotes.sh
@@ -77,7 +77,13 @@
# RELNOTES_NEW for new features changes
# RELNOTES for other changes
function extract_release_note() {
- local relnote="$(git show -s $1 --pretty=format:%B | awk '/^RELNOTES(\[[^\]]+\])?:/,/^$/')"
+ local find_relnote_awk_script="
+ BEGIN { in_relnote = 0 }
+ /^$/ { in_relnote = 0 }
+ /^PiperOrigin-RevId:.*$/ { in_relnote = 0 }
+ /^RELNOTES(\[[^\]]+\])?:/ { in_relnote = 1 }
+ { if (in_relnote) { print } }"
+ local relnote="$(git show -s $1 --pretty=format:%B | awk "${find_relnote_awk_script}")"
local regex="^RELNOTES(\[([a-zA-Z]*)\])?:[[:space:]]*([^[:space:]].*[^[:space:]])[[:space:]]*$"
if [[ "$relnote" =~ $regex ]]; then
local relnote_kind=${BASH_REMATCH[2]}
diff --git a/scripts/release/relnotes_test.sh b/scripts/release/relnotes_test.sh
index 56278b1..0cf42b4 100755
--- a/scripts/release/relnotes_test.sh
+++ b/scripts/release/relnotes_test.sh
@@ -224,4 +224,18 @@
assert_equals "$expected" "$actual"
}
+function test_extract_release_note_for_pre_copybara_commits() {
+ local expected='added --with_aspect_deps to blaze query, that prints additional information about aspects of target when --output is set to {xml, proto, record}.'
+ extract_release_note 14d905b5cce9a1bbc2911331809b03679b23dad1
+ local actual=$(printf "%s\n" "${RELNOTES_NEW[@]}")
+ assert_equals "${expected}" "${actual}"
+}
+
+function test_extract_release_note_for_post_copybara_commits() {
+ local expected="'output_groups' and 'instrumented_files' cannot be specified in DefaultInfo."
+ extract_release_note e788964a6ebc2c4966456ac74044f4f44a126fe5
+ local actual=$(printf "%s\n" "${RELNOTES_[@]}")
+ assert_equals "${expected}" "${actual}"
+}
+
run_suite "Release notes generation tests"
To view, visit change 10793. To unsubscribe, visit settings.
Marcel Hlopko posted comments on this change.
Patch set 1:
Ptal
Damien Martin-guillerez posted comments on this change.
Patch set 1:Verified +1Code-Review +2
Marcel Hlopko uploaded patch set #2 to this change.
Do not put PiperOrigin-RevId tag into relnotes
Change-Id: If79da71d2939517724d92cbe470173b5d68e3019
---
M scripts/release/relnotes.sh
M scripts/release/relnotes_test.sh
2 files changed, 21 insertions(+), 1 deletion(-)
To view, visit change 10793. To unsubscribe, visit settings.
Damien Martin-guillerez uploaded patch set #3 to the change originally created by Marcel Hlopko.
Do not put PiperOrigin-RevId tag into relnotes
Change-Id: If79da71d2939517724d92cbe470173b5d68e3019
PiperOrigin-RevId: 155075510
---
M scripts/release/relnotes.sh
M scripts/release/relnotes_test.sh
2 files changed, 21 insertions(+), 1 deletion(-)
To view, visit change 10793. To unsubscribe, visit settings.
Damien Martin-guillerez merged this change.
Do not put PiperOrigin-RevId tag into relnotes
Change-Id: If79da71d2939517724d92cbe470173b5d68e3019
PiperOrigin-RevId: 155075510