Skip to content

How to make a release

Roman Ivanov edited this page Mar 26, 2014 · 2 revisions

Overview

These instructions were derived from Oliver Burn’s personal check-list that he used to create releases. Feel free to update them (this is a Wiki after all:-).

Pre-reqs

Follow Sonatype setup, this includes:

  • Setup JIRA account
  • Create a GPG key set and upload
  • Setup ~/.m2/settings.xml to include the servers. Follow Maven guide on how to encrypt passwords

Before starting

  • Email the Dev mailing list to confirm all OK to release.
  • Ensure your work space is in sync with Git.
  • Ensure the copyright year in the java.header is up to date.
  • Ensure the system can be packaged.
    mvn clean verify
        
  • Ensure the system can generate the distributions
    mvn -Pdistro clean package
        
  • (Optional) Test against a large code base to verify that nothing is broken. E.g. the JDK source code. I used the following build.xml file that assumes a couple of things (exercise left to reader).
<project name="test" default="test">
  <target name="test">
    <taskdef name="checkstyle"
             classname="com.puppycrawl.tools.checkstyle.CheckStyleTask"
             classpath="checkstyle-5.0/checkstyle-all-5.0.jar"
             />
    <checkstyle config="checkstyle-5.0/sun_checks.xml">
      <fileset dir="src"
               includes="**/*.java"
               />
      <formatter type="plain"/>
    </checkstyle>
  </target>
</project>

Perform build

  • Start from scratch
    mvn clean
        
  • Check nothing is modified
    git status
        
  • Check have the latest
    git pull
        
  • Do a test release and verify it all passes OK. Note, release tag should be something like release5_3.
    mvn release:prepare -DdryRun=true
        
  • Reset the workspace
    mvn release:clean
        
  • Being paranoid, check that nothing is modified
    git stat
        
  • Do a release and verify all Okay.
    mvn release:prepare
        
  • Push the artefacts to the SonaType repository. Note need to specify the SVN username.
    mvn release:perform
        
  • Check nothing is modified
    git status
        
  • Update the work space is on the freshly created tag (use appropriate tag).
    git checkout release5_3
        
  • Build the site from scratch
    mvn clean site
        
  • Check your credentials for FTP access.

password for FTP could be setup at here, if still a problem please contact Sourceforge support. Success of FTP login should looks like:

22:20 ~ $ sftp romanivanov,[email protected]
Password: 
Connected to frs.sourceforge.net.
sftp> ls -la
drwxr-x--x    9 dummy    apache       4096 Feb  3 11:34 .
drwxr-xr-x    2 root     root         4096 Oct 25  2012 ..
drwxr-xr-x    2 dummy    apache       4096 Aug 11  2008 cgi-bin
-rw-r--r--    1 oburn    apache   21858941 Dec 10  2007 cssvndump.zip
drwxr-x--x    5 oburn    apache       4096 Feb  3 11:33 htdocs
drwxr-xr-x    6 oburn    apache       4096 Mar 22  2009 htdocs-4.4
drwxr-x--x    5 oburn    apache       4096 Nov  5  2011 htdocs-5.5
drwxr-xr-x    5 oburn    apache       4096 Sep 18  2012 htdocs-5.6
drwxr-x--x    5 oburn    apache       4096 Sep 23  2013 htdocs-OLD
-rwxr-x--x    1 oburn    apache    2081850 Sep 18  2012 site.zip
-r--r-----    1 dummy    apache      14965 Jan 27  2010 taskmanager-dump.xml
-r--r-----    1 dummy    apache      11908 Oct 21  2009 taskmanager-dump.xml~
drwxr-xr-x    7 oburn    apache       4096 Aug 11  2008 twiki
  • Setup a SourceForge shell for deployment
    ssh -t oburn,[email protected] create
        
  • Deploy the site to the snapshot site and verify it is OK.
    mvn site:deploy
        
  • Deploy the site to the main Checkstyle site. The release profile overrides the <site> property.
    mvn site:deploy -Prelease
        
  • Generate the distribution files. mvn -Pdistro package
  • Update work space to master:
    git checkout master
        

Build from a tag

mvn release:perform -Dtag=release5_5 -DconnectionUrl=scm:hg:ssh://[email protected]/hgroot/checkstyle/checkstyle

Update artefacts

  • Upload the distribution files. Be sure to remove visibility of superseded releases. Also choose to announce the files are uploaded to those monitoring.
  • Promote the artefacts in the Sonatype Repository to be synchronised with the Maven Central. Follow instructions at https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-8.ReleaseIt

Announcements

  • Have a look at http://checkstyle.markmail.org for the recent announcements.
  • Send email announcement to the Checkstyle Announce, User and Dev mailing lists.
  • Submit SourceForge news https://sourceforge.net/news/?group_id=29721.

Final Checks

  • Verify that the artefacts are automatically synchronised to the Maven Central Repository (http://repo1.maven.org/maven2/com/puppycrawl/)