-
Notifications
You must be signed in to change notification settings - Fork 55
Release Process
note: instructions are based on https://brooklyn.incubator.apache.org/v/0.7.0-M1/dev/tips/release.html
winrm4j is released under the Apache 2 license, to maven central.
winrm4j is published to two locations:
- Sonatype, for snapshots and for staging releases
- Maven Central, for full (GA and milestone) releases
winrm4j artifacts are generally downloaded from:
To publish:
- a snapshot release:
- mvn deploy to Sonatype
- a (milestone) release:
- same as above, but with some git versioning
- deploy to Sonatype, then release to Maven Central
- a GA release:
- same as above, and
- bump the snapshot version in brooklyn master to the next release
Your .m2/settings.xml must be configured with the right credentials for Sonatype
<servers>
...
<server>
<username> ... </username>
<password> ... </password>
<id>sonatype-nexus-snapshots</id>
</server>
<server>
<username> ... </username>
<password> ... </password>
<id>sonatype-nexus-staging</id>
</server>
...
</servers>
You must be configured to sign artifacts using PGP.
If this is the first time you have used Sonatype, the Sonatype - Maven Usage Guide is required reading.
The code snippets below use the following variables:
export WINRM4J_DIR=/path/to/winrm4j
export SNAPSHOT_VERSION=0.1.0-SNAPSHOT
export RELEASE_VERSION=0.1.0
export RELEASE_BRANCH_NAME=0.1.x
export NEXT_RELEASE_BRANCH_SNAPSHOT_VERSION=0.1.1-SNAPSHOT
export NEXT_MASTER_SNAPSHOT_VERSION=0.2.0-SNAPSHOT
It assumes that git is configured with upstream, and that direct access to winrm4j is permitted:
git remote add upstream https://github.com/cloudsoft/winrm4j.git
Follow these steps when the $WINRM4J_DIR/pom.xml's version has suffix -SNAPSHOT.
Execute the following:
mvn -Dgpg.passphrase="<your passphrase>" -DdeployTo=sonatype -DskipTests clean install deploy
cd $WINRM4J_DIR
git checkout -b $RELEASE_VERSION
# manually change the version
vi pom.xml
git commit -a -m "Changed version to $RELEASE_VERSION"
git push -u upstream $RELEASE_VERSION
mvn -Dgpg.passphrase="<your passphrase>" -DdeployTo=sonatype -DskipTests clean install deploy
- Go to oss.sonatype.org ... #stagingRepositories (again, need credentials)
- 'Close' the repo
- Test the closed repo; you'll want to add the staging repo to the pom of the downstream project.
- Confirm that the closed Sonatype repo has no errors
- Return to Sonatype: Staging Repositories
- 'Release' the repo
Create a branch for maintenance releases (e.g. 0.1.x):
cd $WINRM4J_DIR
git checkout $RELEASE_VERSION
git checkout -b $RELEASE_BRANCH_NAME
# manually change the pom version to $NEXT_RELEASE_BRANCH_SNAPSHOT_VERSION
vi pom.xml
git commit -a -m "Changed version to $NEXT_RELEASE_BRANCH_SNAPSHOT_VERSION"
git push -u upstream $RELEASE_BRANCH_NAME
Increment the version number in master:
cd $WINRM4J_DIR
git checkout $MASTER
# manually change the pom version to $NEXT_MASTER_SNAPSHOT_VERSION
vi pom.xml
git commit -a -m "Changed version to $NEXT_MASTER_SNAPSHOT_VERSION"
git push