aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xscripts/release/relnotes.sh10
-rwxr-xr-xscripts/release/relnotes_test.sh10
2 files changed, 19 insertions, 1 deletions
diff --git a/scripts/release/relnotes.sh b/scripts/release/relnotes.sh
index adbfe9e918..711e697a02 100755
--- a/scripts/release/relnotes.sh
+++ b/scripts/release/relnotes.sh
@@ -39,7 +39,7 @@ function get_last_release() {
[ -n "${BASELINE_LINE}" ] || return 1 # No baseline = initial release
local BASELINE_LINENB=$(echo "${BASELINE_LINE}" | cut -d ":" -f 1)
BASELINE=$(echo "${BASELINE_LINE}" | cut -d " " -f 2)
- local CHERRYPICK_LINE=$(($BASELINE_LINENB + 1))
+ local CHERRYPICK_LINE=$(($BASELINE_LINENB + 3))
# grep -B999 looks for all lines before the empty line and after that we
# restrict to only lines with the cherry picked hash then finally we cut
# the hash.
@@ -149,13 +149,21 @@ function create_release_notes() {
# commit should be the baseline, and the other one are the cherry-picks.
# The result is of the form:
# Baseline: BASELINE_COMMIT
+#
+# Cherry picks:
# + CHERRY_PICK1: commit message summary of the CHERRY_PICK1. This
# message will be wrapped into 70 columns.
# + CHERRY_PICK2: commit message summary of the CHERRY_PICK2.
function create_revision_information() {
echo "Baseline: $(git rev-parse --short "${1}")"
+ first=1
shift
while [ -n "${1-}" ]; do
+ if [[ "$first" -eq 1 ]]; then
+ echo -e "\nCherry picks:"
+ first=0
+ fi
+
local hash="$(git rev-parse --short "${1}")"
local subject=$(git show -s --pretty=format:%s $hash)
local lines=$(echo "$subject" | wrap_text 56) # 14 leading spaces.
diff --git a/scripts/release/relnotes_test.sh b/scripts/release/relnotes_test.sh
index 92538ffc59..9322b5d817 100755
--- a/scripts/release/relnotes_test.sh
+++ b/scripts/release/relnotes_test.sh
@@ -113,6 +113,8 @@ EOF
## Cherry-picking bb59d88
Baseline: 965c392
+
+Cherry picks:
+ bb59d88: RELNOTES[INC]: Remove deprecated "make var" INCDIR
$TEST_INC_CHANGE
@@ -127,6 +129,8 @@ EOF
## Cherry-picking bb59d88 and 14d905b
Baseline: 965c392
+
+Cherry picks:
+ bb59d88: RELNOTES[INC]: Remove deprecated "make var" INCDIR
+ 14d905b: Add --with_aspect_deps flag to blaze query. This flag
should produce additional information about aspect
@@ -159,6 +163,8 @@ EOF
```
Baseline: 965c392
+
+Cherry picks:
+ bb59d88: RELNOTES[INC]: Remove deprecated "make var" INCDIR
```
@@ -176,6 +182,8 @@ EOF
```
Baseline: 965c392
+
+Cherry picks:
+ bb59d88: RELNOTES[INC]: Remove deprecated "make var" INCDIR
+ 14d905b: Add --with_aspect_deps flag to blaze query. This flag
should produce additional information about aspect
@@ -193,6 +201,8 @@ EOF
function test_create_revision_information() {
expected='Baseline: 965c392
+
+Cherry picks:
+ bb59d88: RELNOTES[INC]: Remove deprecated "make var" INCDIR
+ 14d905b: Add --with_aspect_deps flag to blaze query. This flag
should produce additional information about aspect