From 4ee8e65417d62a3949d48e702b3483e12b4578a7 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Fri, 20 Sep 2019 09:16:39 +0200 Subject: [PATCH] Upload release notes with the "docs" build. The github release is first created as a draft, when we edit the release notes, we publish it (draft=false), so that the release notification mail contains the full release notes. --- .travis.yml | 1 + .travis/release.sh | 66 ++++++++++++++++++++++++---------------------- 2 files changed, 35 insertions(+), 32 deletions(-) diff --git a/.travis.yml b/.travis.yml index c46f4a31de..cdcc09e7e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,6 +58,7 @@ deploy: - pmd-dist/target/pmd-*.zip - docs/pmd-doc-*.zip skip_cleanup: true + draft: true on: tags: true repo: pmd/pmd diff --git a/.travis/release.sh b/.travis/release.sh index bbc16fbd20..5c199336fa 100755 --- a/.travis/release.sh +++ b/.travis/release.sh @@ -28,38 +28,6 @@ if [ "${BUILD}" = "deploy" ]; then true ) -# renders, and skips the first 6 lines - the Jekyll front-matter -RENDERED_RELEASE_NOTES=$(bundle exec .travis/render_release_notes.rb docs/pages/release_notes.md | tail -n +6) - -# Assumes, the release has already been created by travis github releases provider -RELEASE_ID=$(curl -s -H "Authorization: token ${GITHUB_OAUTH_TOKEN}" https://api.github.com/repos/pmd/pmd/releases/tags/pmd_releases/${RELEASE_VERSION}|jq ".id") -RELEASE_NAME="PMD ${RELEASE_VERSION} ($(date -u +%d-%B-%Y))" -RELEASE_BODY="$RENDERED_RELEASE_NOTES" -RELEASE_BODY="${RELEASE_BODY//'\'/\\\\}" -RELEASE_BODY="${RELEASE_BODY//$'\r'/}" -RELEASE_BODY="${RELEASE_BODY//$'\n'/\\r\\n}" -RELEASE_BODY="${RELEASE_BODY//'"'/\\\"}" -cat > release-edit-request.json < release-edit-request.json <