[ci] Fix do-release.sh script

This commit is contained in:
Andreas Dangel 2020-12-04 17:34:09 +01:00
parent 70e8639c2b
commit fcbccbce43
2 changed files with 5 additions and 5 deletions

View File

@ -187,6 +187,7 @@ function pmd_ci_build_and_upload_doc() {
gh_release_updateRelease "$GH_RELEASE" "$release_name" "$rendered_release_notes"
sourceforge_uploadReleaseNotes "${VERSION}" "${rendered_release_notes}"
# updates https://pmd.github.io/latest/ and https://pmd.github.io/pmd-${VERSION}
publish_release_documentation_github
sourceforge_rsyncSnapshotDocumentation "${VERSION}" "pmd-${VERSION}"
fi

View File

@ -24,8 +24,7 @@ echo "-------------------------------------------"
echo "Releasing PMD"
echo "-------------------------------------------"
# see also https://gist.github.com/pdunnavant/4743895
CURRENT_VERSION=$(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:3.0.0:exec)
CURRENT_VERSION=$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout)
RELEASE_VERSION=${CURRENT_VERSION%-SNAPSHOT}
MAJOR=$(echo $RELEASE_VERSION | cut -d . -f 1)
MINOR=$(echo $RELEASE_VERSION | cut -d . -f 2)
@ -128,7 +127,7 @@ bundle install
export RELEASE_NOTES_POST="_posts/$(date -u +%Y-%m-%d)-PMD-${RELEASE_VERSION}.md"
echo "Generating ../pmd.github.io/${RELEASE_NOTES_POST}..."
NEW_RELEASE_NOTES=$(bundle exec .travis/render_release_notes.rb docs/pages/release_notes.md | tail -n +6)
NEW_RELEASE_NOTES=$(bundle exec .ci/render_release_notes.rb docs/pages/release_notes.md | tail -n +6)
cat > ../pmd.github.io/${RELEASE_NOTES_POST} <<EOF
---
layout: post
@ -163,7 +162,7 @@ git commit -a -m "Prepare pmd release ${RELEASE_VERSION}"
echo
echo "Tag has been pushed.... now check travis build: <https://travis-ci.com/pmd/pmd>"
echo "Tag has been pushed.... now check github actions: <https://github.com/pmd/pmd/actions>"
echo
echo
echo "Press enter to continue..."
@ -228,7 +227,7 @@ echo
echo
echo "Verify the new release on github: <https://github.com/pmd/pmd/releases/tag/pmd_releases/${RELEASE_VERSION}>"
echo
echo "* Wait until the new version is synced to maven central and appears in as latest version in"
echo "* Wait until the new version is synced to maven central and appears as latest version in"
echo " <https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd/maven-metadata.xml>."
echo "* Submit news to SF on <https://sourceforge.net/p/pmd/news/> page. Use same text as in the email below."
echo "* Send out an announcement mail to the mailing list:"