From e7be839c1ce7df2048b86bc956207f86db4e5b65 Mon Sep 17 00:00:00 2001 From: Kristina Chodorow Date: Fri, 22 Apr 2016 20:34:37 +0000 Subject: 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 --- scripts/release/relnotes.sh | 10 +++++++++- scripts/release/relnotes_test.sh | 10 ++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'scripts/release') 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 -- cgit v1.2.3