From 43a21997d98207608013932e24b8e829c1fe83b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Wed, 15 Aug 2018 04:08:15 +0200 Subject: [PATCH] Update do-release.sh --- Gemfile | 9 +++++++-- do-release.sh | 18 +++++++----------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Gemfile b/Gemfile index 021d709a97..0fff68b993 100644 --- a/Gemfile +++ b/Gemfile @@ -2,8 +2,13 @@ source 'https://rubygems.org/' gem 'pmdtester', '~> 1.0.0.pre.beta3' gem 'danger', '~> 5.6', '>= 5.6' -gem 'liquid', '>=4.0.0' -gem 'safe_yaml', '>=1.0' +# I think we could skip installing these if we're not a release build +# https://docs.travis-ci.com/user/languages/ruby/#speeding-up-your-build-by-excluding-non-essential-dependencies +# I don't know where to put that in .travis.yml though... +group :release_notes_preprocessing do + gem 'liquid', '>=4.0.0' + gem 'safe_yaml', '>=1.0' +end # vim: syntax=ruby diff --git a/do-release.sh b/do-release.sh index 41a858b6fc..5a73bdb61a 100755 --- a/do-release.sh +++ b/do-release.sh @@ -68,13 +68,10 @@ export CURRENT_BRANCH RELEASE_RULESET="pmd-core/src/main/resources/rulesets/releases/${RELEASE_VERSION//\./}.xml" -echo "* Update version/release info in **docs/pages/release_notes.md**." -echo -echo " ## $(date -u +%d-%B-%Y) - ${RELEASE_VERSION}" -echo echo "* Update date info in **docs/_config.yml**." +echo " date: $(date -u +%d-%B-%Y)" echo -echo "* Ensure all the new rules are listed in a the proper file:" +echo "* Ensure all the new rules are listed in the proper file:" echo " ${RELEASE_RULESET}" echo echo "* Update **../pmd.github.io/_config.yml** to mention the new release" @@ -140,7 +137,7 @@ read # update release_notes_old OLD_RELEASE_NOTES=$(tail -n +8 docs/pages/release_notes_old.md) -NEW_RELEASE_NOTES=$(tail -n +6 docs/pages/release_notes.md) +NEW_RELEASE_NOTES=$(.travis/render_release_notes.rb docs/pages/release_notes.md | tail -n +6) echo "$(head -n 7 docs/pages/release_notes_old.md)" > docs/pages/release_notes_old.md echo "$NEW_RELEASE_NOTES" >> docs/pages/release_notes_old.md echo >> docs/pages/release_notes_old.md @@ -154,11 +151,11 @@ permalink: pmd_release_notes.html keywords: changelog, release notes --- -## ????? - ${DEVELOPMENT_VERSION} +## {{ site.pmd.date }} - {{ site.pmd.version | append_unless: is_release_version, "-SNAPSHOT" }} -The PMD team is pleased to announce PMD ${DEVELOPMENT_VERSION%-SNAPSHOT}. +The PMD team is pleased to announce PMD {{ site.pmd.version }}. -This is a minor release. +This is a {{ site.pmd.release_type }} release. ### Table Of Contents @@ -193,7 +190,7 @@ echo echo " * Downloads: https://github.com/pmd/pmd/releases/tag/pmd_releases%2F${RELEASE_VERSION}" echo " * Documentation: https://pmd.github.io/pmd-${RELEASE_VERSION}/" echo -echo " And Copy-Paste the release notes" +echo "$NEW_RELEASE_NOTES" echo echo echo @@ -203,4 +200,3 @@ echo "------------------------------------------" echo -