Fix: [AzurePipelines] always list the full changelog since last stable

This commit is contained in:
Patric Stout 2019-02-09 23:34:06 +01:00
parent 148e5b41d6
commit 4d5d21be76

View File

@ -2,13 +2,9 @@
tag=$(git describe --tags 2>/dev/null) tag=$(git describe --tags 2>/dev/null)
# If we are a tag, show the part of the changelog that matches the tag. # If we are a tag, show the part of the changelog till (but excluding) the last stable
# In case of a stable, also show all betas and RCs.
if [ -n "$tag" ]; then if [ -n "$tag" ]; then
grep="." grep='^[0-9]\.[0-9]\.[0-9][^-]'
if [ "$(echo $tag | grep '-')" = "" ]; then
grep='^[0-9]\.[0-9]\.[0-9][^-]'
fi
next=$(cat changelog.txt | grep '^[0-9]' | awk 'BEGIN { show="false" } // { if (show=="true") print $0; if ($1=="'$tag'") show="true"} ' | grep "$grep" | head -n1 | sed 's/ .*//') next=$(cat changelog.txt | grep '^[0-9]' | awk 'BEGIN { show="false" } // { if (show=="true") print $0; if ($1=="'$tag'") show="true"} ' | grep "$grep" | head -n1 | sed 's/ .*//')
cat changelog.txt | awk 'BEGIN { show="false" } /^[0-9].[0-9].[0-9]/ { if ($1=="'$next'") show="false"; if ($1=="'$tag'") show="true";} // { if (show=="true") print $0 }' cat changelog.txt | awk 'BEGIN { show="false" } /^[0-9].[0-9].[0-9]/ { if ($1=="'$next'") show="false"; if ($1=="'$tag'") show="true";} // { if (show=="true") print $0 }'
exit 0 exit 0