Skip to content

Latest commit

 

History

History
104 lines (77 loc) · 3.74 KB

File metadata and controls

104 lines (77 loc) · 3.74 KB

Releasing createsend-java

Requirements

  • You must have Apache Maven 3.0.4 or greater installed.
  • You must have a gpg key which is registered on a public key server (see How To Generate PGP Signatures With Maven)
  • You must have a Sonatype OSS account with publish rights for the com.createsend group (see Sonatype OSS Maven Repository Usage Guide)
  • You must have a ~/.m2/settings.xml file which includes the Sonatype repositories, your Sonatype credentials, and your gpg keyname and passphrase:
<settings>
  <servers>
    <server>
      <id>sonatype-nexus-snapshots</id>
      <username>username</username>
      <password>password</password>
    </server>
    <server>
      <id>sonatype-nexus-staging</id>
      <username>username</username>
      <password>password</password>
    </server>
  </servers>
  <profiles>
    <profile>
      <id>gpg</id>
      <properties>
        <gpg.keyname>yourkeyname</gpg.keyname>
        <gpg.passphrase>yourpassphrase</gpg.passphrase>
      </properties>
    </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>gpg</activeProfile>
  </activeProfiles>
</settings>

Releasing developer snapshot versions

You can release developer snapshot versions of the package at any time for developer testing. These are released by running:

$ gradle uploadArchive

Developer snapshot versions can be found in the snapshot repo.

Releasing production versions

Prepare release

  • Increment version constants in the following files, ensuring that you use Semantic Versioning:

    • build.gradle
    • pom.xml
    • src/com/createsend/util/config.properties
  • Add an entry to HISTORY.md which clearly explains the new release.

  • Commit your changes:

$ git commit -am "Version X.Y.Z"

Releasing to Sonatype OSS staging repository

Ensure that the version specified in pom.xml includes the -SNAPSHOT suffix. It should take the form: <version>X.Y.Z-SNAPSHOT</version>

Then prepare the release. This will tag the repository and increment the version number in pom.xml for the next development iteration. When you are asked for the tag to apply to the release, use a tag of the form: vX.Y.Z.

$ mvn -Dresume=false release:prepare

Then perform the release. This will build and sign all artifacts and upload them to the staging repository.

$ mvn release:perform

Promoting the release from staging

In order to promote the release from the staging repository, log in to Sonatype OSS, and from the Build Promotion tab on the left hand site select Staging Repositories.

The release you just uploaded should show up in the list. Select the release and click Close. This will check if the deployment is complete and properly signed, then create a staging repository which can be used for testing. Once the closing process is successful, click Release to actually release it to the release repo. The release repo is synced with Maven Central.

Generate and publish javadoc

Generate and publish the javadoc for the new release:

$ ./update-javadoc.sh

Documentation is published to: http://campaignmonitor.github.io/createsend-java/doc/