aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/release
diff options
context:
space:
mode:
authorGravatar Marcel Hlopko <hlopko@google.com>2017-05-04 16:04:23 +0200
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2017-05-04 17:01:06 +0200
commitdb13625aa123cd0b217fd70ba840b3685ffe0ecc (patch)
tree3c243ba18d07a5906c6401fc9c01cc6b644b4129 /scripts/release
parent52637bedbd0ca9157d39c012f027449d19d4e012 (diff)
Do not put PiperOrigin-RevId tag into relnotes
Change-Id: If79da71d2939517724d92cbe470173b5d68e3019 PiperOrigin-RevId: 155075510
Diffstat (limited to 'scripts/release')
-rwxr-xr-xscripts/release/relnotes.sh8
-rwxr-xr-xscripts/release/relnotes_test.sh14
2 files changed, 21 insertions, 1 deletions
diff --git a/scripts/release/relnotes.sh b/scripts/release/relnotes.sh
index aed0b5cc17..817ea621d7 100755
--- a/scripts/release/relnotes.sh
+++ b/scripts/release/relnotes.sh
@@ -77,7 +77,13 @@ function get_release_notes_commits() {
# 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 56278b1f46..0cf42b46ab 100755
--- a/scripts/release/relnotes_test.sh
+++ b/scripts/release/relnotes_test.sh
@@ -224,4 +224,18 @@ Cherry picks:
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"