From 38173659b3153f2040f99f4b2d66b7614adb74ba Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Sat, 25 Feb 2017 20:07:37 +0100 Subject: [PATCH] Update release script, most steps are automatic now --- do-release.sh | 271 ++++++++++---------------------------------------- 1 file changed, 52 insertions(+), 219 deletions(-) diff --git a/do-release.sh b/do-release.sh index c6ef71fc1b..4e884f6f7c 100755 --- a/do-release.sh +++ b/do-release.sh @@ -1,63 +1,5 @@ #!/bin/bash -# work around a maven-scm bug with git while releasing -# this might also be necessary: git config --add status.displayCommentPrefix true -# see https://jira.codehaus.org/browse/SCM-740 -export LANG=C - -export MAVEN_OPTS="-XX:MaxPermSize=1g" - - -# check setup -if [ "" = "$PMD_SF_USER" ]; then - echo "No env variable PMD_SF_USER specified. This is the sourceforge account name needed" - echo "during the release process to upload files via ssh/scp/rsync." - echo - echo "Please set the variable, e.g. in your ~/.bashrc:" - echo - echo "PMD_SF_USER=sfuser" - echo "export PMD_SF_USER" - echo - exit 1 -fi -if [ "" = "$PMD_SF_APIKEY" ]; then - echo "No env variable PMD_SF_APIKEY specified. This is the release api key," - echo "needed to set the default download file. You can create an api key in" - echo "your user preferences on sourceforge.net" - echo - echo "Please set the variable, e.g. in your ~/.bashrc:" - echo - echo "PMD_SF_APIKEY=abcd-efgh-xxxx" - echo "export PMD_SF_APIKEY" - echo - exit 1 -fi - -if [ "" = "$PMD_GPG_PROFILE" ]; then - echo "No env variable PMD_GPG_PROFILE specified. This is your maven profile, which configures" - echo "the properties gpg.keyname and gpg.passphrase used" - echo "to sign the created release artifacts before uploading to maven central." - echo - echo "Please set the variable, e.g. in your ~/.bashrc:" - echo - echo "PMD_GPG_PROFILE=pmd-gpg" - echo "export PMD_GPG_PROFILE" - echo - echo "And in your ~/.m2/settings.xml file:" - echo - echo " " - echo " " - echo " pmd-gpg" - echo " " - echo " AB123CDE" - echo " " - echo " " - echo " " - echo " " -echo " Close and Release the staging repository" -echo " Check here: " +echo "Tag has been pushed.... now check travis build: " echo -echo "Press enter to continue..." -read - -echo -echo "Creating the pmd-doc-${RELEASE_VERSION}.zip archive..." -( - cd target - mv staging pmd-doc-${RELEASE_VERSION} - zip -r pmd-doc-${RELEASE_VERSION}.zip pmd-doc-${RELEASE_VERSION}/ -) - -echo -echo "Adding the site to pmd.github.io..." -rsync -avhP target/pmd-doc-${RELEASE_VERSION}/ ../../../pmd.github.io/pmd-${RELEASE_VERSION}/ -( - cd ../../../pmd.github.io - git add pmd-${RELEASE_VERSION} - git commit -m "Added pmd-${RELEASE_VERSION}" -) - -echo -echo "Uploading the zip files..." -rsync -avhP pmd-dist/target/pmd-*-${RELEASE_VERSION}.zip target/pmd-doc-${RELEASE_VERSION}.zip $PMD_SF_USER@web.sourceforge.net:/home/frs/project/pmd/pmd/${RELEASE_VERSION}/ -rsync -avhP src/site/markdown/overview/changelog.md $PMD_SF_USER@web.sourceforge.net:/home/frs/project/pmd/pmd/${RELEASE_VERSION}/ReadMe.md -echo - -if [ ! "" = "$PMD_LOCAL_BINARIES" -a -d $PMD_LOCAL_BINARIES ]; then - echo "Copying the files to local storage directory $PMD_LOCAL_BINARIES..." - cp -av pmd-dist/target/pmd-*-${RELEASE_VERSION}.zip target/pmd-doc-${RELEASE_VERSION}.zip $PMD_LOCAL_BINARIES - echo -fi - -echo "Making the binary the new default file..." -curl -H "Accept: application/json" -X PUT -d "default=windows&default=mac&default=linux&default=bsd&default=solaris&default=others" \ - -d "api_key=${PMD_SF_APIKEY}" https://sourceforge.net/projects/pmd/files/pmd/${RELEASE_VERSION}/pmd-bin-${RELEASE_VERSION}.zip -echo - -echo -echo "Verify the md5sums: " -md5sum pmd-dist/target/pmd-*-${RELEASE_VERSION}.zip target/pmd-doc-${RELEASE_VERSION}.zip - -echo -echo "Press enter to continue..." -read -) - echo echo "Submit news to SF on page. You can use" echo "the following template:" @@ -248,71 +95,56 @@ echo "Press enter to continue..." read echo -echo "Close the milestone on sourceforge and create a new one..." +echo "Check the milestone on sourceforge:" echo "" echo -echo "Press enter to continue..." -read - -echo "Last step - next development version:" +echo +echo +echo "Prepare Next development version:" echo "* Move version/release info from **src/site/markdown/overview/changelog.md** to **src/site/markdown/overview/changelog-old.md**." echo "* Update version/release info in **src/site/markdown/overview/changelog.md**." -echo "* Update pmd-{java8,ui}/pom.xml - the version is probably wrong - set it to the parent's=next development version: ${DEVELOPMENT_VERSION}." echo cat <" echo -echo " * Set the title: PMD ${RELEASE_VERSION} ($(date -u +%d-%B-%Y))" -echo " * copy/paste the changelog.md" -echo " * Upload the binary zip file" -echo " * Upload the doc zip file" -echo " * Upload the src zip file" echo -echo "Press enter to continue..." -read - - +echo "Verify the new release on github: " +echo +echo +echo "Send out an announcement mail to the mailing list: +echo "To: PMD Developers List +echo "Subject: [ANNOUNCE] PMD ${RELEASE_VERSION} Released" +echo "Body: !!Copy Changelog!!" +echo echo echo "------------------------------------------" echo "Done." @@ -320,3 +152,4 @@ echo "------------------------------------------" echo +