diff options
author | Charles Pigott <charlespigott@googlemail.com> | 2019-10-30 19:26:19 +0000 |
---|---|---|
committer | Charles Pigott <charlespigott@googlemail.com> | 2019-11-02 11:31:59 +0000 |
commit | 3775381c10f81461aec2ee0aff2dedc004723098 (patch) | |
tree | 772aa4d735995c2d757a0e8b592f3e9cce49df7a | |
parent | ccb4c3797fe5a98e9c40eb2c4e3da004c449c301 (diff) | |
download | openttd-3775381c10f81461aec2ee0aff2dedc004723098.tar.xz |
Fix: [Pipelines] Account for versions being more than one digit when generating changelog output
-rwxr-xr-x | azure-pipelines/changelog.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/azure-pipelines/changelog.sh b/azure-pipelines/changelog.sh index 33eb8a78d..be665a5a0 100755 --- a/azure-pipelines/changelog.sh +++ b/azure-pipelines/changelog.sh @@ -4,9 +4,9 @@ tag=$(git describe --tags 2>/dev/null) # If we are a tag, show the part of the changelog till (but excluding) the last stable if [ -n "$tag" ]; then - grep='^[0-9]\.[0-9]\.[0-9][^-]' + grep='^[0-9]\+\.[0-9]\+\.[0-9]\+[^-]' 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 fi |