Skip to content

How to make a release

Andrei Selkin edited this page Aug 4, 2016 · 234 revisions

Content

Pre-reqs

Follow Sonatype setup, this includes :

  • Setup JIRA account, link, and request write access to repository (example).
  • Create a GPG key set and upload (example)
  • Setup ~/.m2/settings.xml to include the servers (instructions). Follow Maven guide on how to encrypt passwords
<settings>
..... 
    <servers>
        <server>
            <id>sonatype-nexus-snapshots</id>
            <username>romanivanov</username>
            <password>password</password>
        </server>
        <server>
            <id>sonatype-nexus-staging</id>
            <username>romanivanov</username>
            <password>password</password>
        </server>
        <server>
            <id>sourceforge-new-site</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>
Note how the id element in the server element in settings.xml is identical to the id elements in the snapshotRepository and repository element as well as the serverId configuration of the Nexus Staging Maven plugin (Server id is taken from our project parent pom file - http://repo2.maven.org/maven2/org/sonatype/oss/oss-parent/9/oss-parent-9.pom ).

Before starting

find . -type f \( -name *.java -o -name *.header \) -exec sed -i  \
  "s/\/\/ Copyright (C) 2001-2015 the original author or authors./\/\/ Copyright (C) 2001-2016 the original author or authors./g" \
  {} +
  • 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:
mvn versions:set -DnewVersion=6.4.1-SNAPSHOT && mvn versions:commit
git add pom.xml && git commit -m "update to 6.4.1-SNAPSHOT" && git push

Perform release build

ATTENTION: before providing password for SSH , verify that previous version and next versions are what you expect.

Update for released version reference

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, do not proceed further till artifact appear in Maven Central Repository.

curl http://repo1.maven.org/maven2/com/puppycrawl/tools/checkstyle/
curl "http://search.maven.org/solrsearch/select/?q=com.puppycrawl.tools&a=checkstyle&wt=json"

update to point to new version of Checkstyle (WE need to recheck why “RELEASE” as version does not help us):

.

Final Checks

  • MANDATORY!!: Verify that build statuses are green

https://github.com/sevntu-checkstyle/checkstyle-samples ,

https://github.com/sevntu-checkstyle/sevntu.checkstyle ,

https://github.com/checkstyle/contribution,

https://github.com/checkstyle/checkstyle

Update for HTML reports

Announcements

TODO: automate by https://developer.github.com/v3/repos/releases/#edit-a-release