diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/release/relnotes.sh | 2 | ||||
-rwxr-xr-x | scripts/release/relnotes_test.sh | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/scripts/release/relnotes.sh b/scripts/release/relnotes.sh index e72d3d42e8..8c342b2ddd 100755 --- a/scripts/release/relnotes.sh +++ b/scripts/release/relnotes.sh @@ -64,7 +64,7 @@ function get_release_notes_commits() { | grep -E '^[a-z0-9]+ Rollback of commit [a-z0-9]+.$' || true) local rollback_hashes=$(echo "$rollback_commits" | cut -d " " -f 1) local rolledback_hashes=$(echo "$rollback_commits" | cut -d " " -f 5 | sed -E 's/^(.......).*$/\1/') - local exclude_hashes=$(echo $cherry_picks $rollback_hashes $rolledback_hashes | xargs echo | sed 's/ /|/g') + local exclude_hashes=$(echo DUMMY $cherry_picks $rollback_hashes $rolledback_hashes | xargs echo | sed 's/ /|/g') git log --reverse --pretty=format:%H ${baseline}.. -E --grep='^RELNOTES(\[[^\]+\])?:' \ | grep -Ev "^(${exclude_hashes})" || true } diff --git a/scripts/release/relnotes_test.sh b/scripts/release/relnotes_test.sh index a3c8cebf6e..66adf700e5 100755 --- a/scripts/release/relnotes_test.sh +++ b/scripts/release/relnotes_test.sh @@ -239,4 +239,16 @@ function test_extract_release_note_for_post_copybara_commits() { assert_equals "${expected}" "${actual}" } +function test_commit_list_no_rollback() { + git checkout -q 2ea4fa26281175c316651ec50784b820a9f409cf + local expected='7c672ac643dd59bf4b3e284c6ad019c54545492f +0257c29f496719bb8414d012334155de6bbefa11 +a9c46e5907be66248b6218ae70e0a1d999c696d5 +78927792c77a6468607e215034c22b0641553f77 +8882192897fa3453d51fe907d19f948215a581af +2ea4fa26281175c316651ec50784b820a9f409cf' + local actual="$(get_release_notes_commits 7c605cf6ea9755a06e5abb16a631faac8ebe2937)" + assert_equals "${expected}" "${actual}" +} + run_suite "Release notes generation tests" |