fix change log generation

Signed-off-by: Ashish Amarnath <ashisham@vmware.com>
This commit is contained in:
Ashish Amarnath
2020-05-08 16:38:10 -07:00
parent e400be9c8f
commit e85ffcb415

View File

@@ -18,6 +18,8 @@ set -o errexit
set -o nounset
set -o pipefail
function join { local IFS="$1"; shift; echo "$*"; }
CHANGELOG_PATH='changelogs/unreleased'
UNRELEASED=$(ls -t ${CHANGELOG_PATH})
echo -e "Generating CHANGELOG markdown from ${CHANGELOG_PATH}\n"
@@ -25,7 +27,9 @@ for entry in $UNRELEASED
do
IFS=$'-' read -ra pruser <<<"$entry"
contents=$(cat ${CHANGELOG_PATH}/${entry})
echo " * ${contents} (#${pruser[0]}, @${pruser[1]})"
pr=${pruser[0]}
user=$(join '-' ${pruser[@]:1})
echo " * ${contents} (#${pr}, @${user})"
done
echo -e "\nCopy and paste the list above in to the appropriate CHANGELOG file."
echo "Be sure to run: git rm ${CHANGELOG_PATH}/*"