Add a "Cherry picks" line to the release notes
I was confused about the bulleted list on 0.2.2, so I figured it
would be nice tell people what the commit list is.
--
MOS_MIGRATED_REVID=120577721
diff --git a/scripts/release/relnotes.sh b/scripts/release/relnotes.sh
index adbfe9e..711e697 100755
--- a/scripts/release/relnotes.sh
+++ b/scripts/release/relnotes.sh
@@ -39,7 +39,7 @@
[ -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 @@
# 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 92538ff..9322b5d 100755
--- a/scripts/release/relnotes_test.sh
+++ b/scripts/release/relnotes_test.sh
@@ -113,6 +113,8 @@
## Cherry-picking bb59d88
Baseline: 965c392
+
+Cherry picks:
+ bb59d88: RELNOTES[INC]: Remove deprecated "make var" INCDIR
$TEST_INC_CHANGE
@@ -127,6 +129,8 @@
## 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 @@
```
Baseline: 965c392
+
+Cherry picks:
+ bb59d88: RELNOTES[INC]: Remove deprecated "make var" INCDIR
```
@@ -176,6 +182,8 @@
```
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 @@
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