From b4ffc8cf755f017952dfdce37a117ec826226ae3 Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Wed, 23 Aug 2017 08:07:36 +0200 Subject: [PATCH] Put greekeeper changelog in a separate block --- tasks/changelog.sh | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/tasks/changelog.sh b/tasks/changelog.sh index 27603e6000..8e3f7f4b88 100755 --- a/tasks/changelog.sh +++ b/tasks/changelog.sh @@ -44,20 +44,27 @@ main() { git log --first-parent --format='%aN|%s %b' ${1} | { while read l; do - if ! [[ ${l} =~ "openlayers/greenkeeper" ]] ; then - if [[ ${l} =~ ${MERGE_RE} ]] ; then - number="${BASH_REMATCH[1]}" - author="${BASH_REMATCH[2]}" - summary="${BASH_REMATCH[3]}" - echo " * [#${number}](${PULLS_URL}/${number}) - ${summary} ([@${author}](${GITHUB_URL}/${author}))" - elif [[ ${l} =~ ${SQUASH_RE} ]] ; then - number="${BASH_REMATCH[3]}" - author="${BASH_REMATCH[1]}" - summary="${BASH_REMATCH[2]}" - echo " * [#${number}](${PULLS_URL}/${number}) - ${summary} ([${author}](${GITHUB_URL}/search?q=${author}&type=Users))" - fi + output="`[[ ${l} =~ "openlayers/greenkeeper" ]] && echo greenkeeper || echo main`_output" + if [[ ${l} =~ ${MERGE_RE} ]] ; then + number="${BASH_REMATCH[1]}" + author="${BASH_REMATCH[2]}" + summary="${BASH_REMATCH[3]}" + declare $output+=" * [#${number}](${PULLS_URL}/${number}) - ${summary} ([@${author}](${GITHUB_URL}/${author}))\n" + elif [[ ${l} =~ ${SQUASH_RE} ]] ; then + number="${BASH_REMATCH[3]}" + author="${BASH_REMATCH[1]}" + summary="${BASH_REMATCH[2]}" + declare $output+=" * [#${number}](${PULLS_URL}/${number}) - ${summary} ([${author}](${GITHUB_URL}/search?q=${author}&type=Users))\n" fi done + + echo -e "$main_output" + + if [ -n "$greenkeeper_output" ]; then + echo + echo "Additionally a number of updates where made to our dependencies:" + echo -e "$greenkeeper_output" + fi } }