-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
How to make a release
- Pre-reqs
- Before starting
- Perform release build
- Update for released version reference
- Final Checks
- Announcements
Follow Sonatype setup, this includes :
- Setup JIRA account, link, and request write access to repository (example).
- Create a GPG key set and upload (example)
- put Github token to ~/.m2/token-checkstyle.txt
- Setup ~/.m2/settings.xml to include the servers (instructions). Follow Maven guide on how to encrypt passwords
<settings>
.....
<servers>
<server>
<id>sonatype-nexus-staging</id>
<username>romanivanov</username>
<password>password</password>
</server>
</servers>
<profiles>
<profile>
<!-- "mvn release:prepare .... -Pgpg"
and it is possible to skip " -Dgpg.passphrase=xxxx" at "-Darguments"
Use "gpg \-\-list-keys", "pub 1024D/C6EED57A 2010-01-13"
to get "gpg.keyname" in example it is value "C6EED57A"
-->
<id>gpg</id>
<properties>
<gpg.passphrase>your_passphase</gpg.passphrase>
<gpg.keyname>C6EED57A</gpg.keyname>
</properties>
</profile>
</profiles>
.....
<settings>
- verify that all CI are green, all CI badges should be green - https://github.com/checkstyle/checkstyle
- Verify that test release works fine on Travis: https://travis-ci.org/checkstyle/checkstyle/builds, search for “release dry run”.
- Ensure your work space is in sync with Git.
- Ensure that repository is cloned by ssh protocol.
- Recheck that copyright is updated to recent year at by execution of https://github.com/checkstyle/checkstyle/blob/master/.ci/bump-license-year-in-all-projects.sh
- Next version. Review all changes and if where is no new Checks or new options in Checks or any new functionality that might require updated in some Checkstyle plugins and integrations - please bump only 3rd digit of release number:
If version was changed Change milestone number in github. Most likely it is not required to update other repos with new version, as next version will be most likely bump in minor number, … but there could be failures in CIs…. .
mvn versions:set -DnewVersion=10.3.1-SNAPSHOT && mvn versions:commit git add pom.xml && git commit -m "config: update to 10.3.1-SNAPSHOT" && git push
- ATTENTION: Before release script execution … Admin need to prepare Release notes at web site template. Content of release notes is taken from Travis build item example for 6.14 release, generated by releasenotes-builder
- Ensure that after all changes are done, nothing is left un-pushed.
git status
- link private key to special name
ln ~/.ssh/id_rsa ~/.ssh/private_sourceforge_key
ATTENTION: before providing password for SSH , verify that previous version and next versions are what you expect.
- Run:
.../checkstyle [master|✔] $ ./release.sh
- copy site to sourceforge (mirror), if it fails do not stop release process:
export SF_USER=romanivanov
NEW_RELEASE=$(git describe --abbrev=0 | cut -d '-' -f 2)
./.ci/copy-site-to-sourceforge.sh $NEW_RELEASE
Recheck release notes: https://github.com/checkstyle/checkstyle/releases/ .
Recheck milestones: https://github.com/checkstyle/checkstyle/milestones
Attention: if process is hanging on stage of version bump (scm plugin):
#stop the process (cntrl+c)
mvn release:rollback
git tag -d checkstyle-7.2
git push origin :refs/tags/checkstyle-7.2
./release.sh
If you lost a moment when password was required to upload by `scp` to hosting, you can repeat by
mvn -e -Pgpg release:perform \
-Darguments='-Dcheckstyle.ant.skip=true -Dcheckstyle.skip=true -DskipNexusStagingDeployMojo=true'
ATTENTION: Verify that the artifacts are automatically synchronized to the Maven Central Repository, Maven Search Engine. (beware that artifact appearance on maven central could take from 10 min to 2 hours) Syncing to Maven Central could take some time.
ATTENTION: do not proceed further till artifact appear in Maven Central Repository.
curl https://repo1.maven.org/maven2/com/puppycrawl/tools/checkstyle/
curl "https://search.maven.org/solrsearch/select/?q=com.puppycrawl.tools&a=checkstyle&wt=json"
VERSION=$(git describe $(git rev-list --tags --max-count=1) | sed "s/checkstyle-//") \
&& while [[ $(curl -s -o /dev/null -I -w "%{http_code}" \
https://repo1.maven.org/maven2/com/puppycrawl/tools/checkstyle/$VERSION/) != 200 ]]; do \
sleep 60; \
done; \
notify-send "checkstyle $VERSION is accessible"
- put news in twitter by action recheck post at @checkstyle_java.
- put github format release notes to https://github.com/checkstyle/checkstyle/releases/tag, get content from release notes builder `GitHub post`
- MANDATORY!!: Verify that build statuses are green to fix issues before announcements
https://github.com/sevntu-checkstyle/checkstyle-samples ,