From 30655555bdab0d6a402387e70e044c92f6b28ed9 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 11 May 2021 16:20:28 +0200 Subject: [PATCH] Remove .RELEASE suffix before querying GitHub This commit removes the `.RELEASE` suffix of the released version, if necessary. Such commit is not present on GitHub and the changelog generation process fails to find the milestone to use to generate the changelog. Closes gh-26796 --- ci/scripts/generate-changelog.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ci/scripts/generate-changelog.sh b/ci/scripts/generate-changelog.sh index d3d2b97e5db..49e96c1ff32 100755 --- a/ci/scripts/generate-changelog.sh +++ b/ci/scripts/generate-changelog.sh @@ -4,9 +4,14 @@ set -e CONFIG_DIR=git-repo/ci/config version=$( cat artifactory-repo/build-info.json | jq -r '.buildInfo.modules[0].id' | sed 's/.*:.*:\(.*\)/\1/' ) +milestone=${version} +if [[ $RELEASE_TYPE = "RELEASE" ]]; then + milestone=${version%.RELEASE} +fi + java -jar /github-changelog-generator.jar \ --spring.config.location=${CONFIG_DIR}/changelog-generator.yml \ - ${version} generated-changelog/changelog.md + ${milestone} generated-changelog/changelog.md echo ${version} > generated-changelog/version echo v${version} > generated-changelog/tag