...
Code Block | ||||
---|---|---|---|---|
| ||||
#!/bin/bash export JAVA_HOME=/usr/java/jdk1.68.0_45xx KEYSTORE=$HOME/.keystore pushd $(dirname $0) $JAVA_HOME/bin/keytool -importcert -alias Sonatype-OSS-CA -file ~/Downloads/IzPack-Migration/Sonatype/oss.sonatype.org -trustcacerts -keystore $KEYSTORE popd |
...
As an example, we will consider the release of version 5.02.02.
Do a dry run
No Format |
---|
mvn -DperformRelease=true -Dtag=izpack-5.02.02 release:prepare -DdryRun=true -DreleaseVersion=5.02.02 -DdevelopmentVersion=5.02.13-SNAPSHOT |
Release!
Build locally and prepare the staging repository at Sonatype Nexus:
...
Code Block | ||
---|---|---|
| ||
export JAVA_HOME=/usr/java/jdk1.68.0_xx RELEASE_VERSION=5.02.02 DEVELOPMENT_VERSION=5.02.13-SNAPSHOT # Preparing the release mvn release:clean mvn -Dtag=izpack-${RELEASE_VERSION} -DreleaseVersion=${RELEASE_VERSION} -DdevelopmentVersion=${DEVELOPMENT_VERSION} release:prepare # Fixing the versions of the native child modules not deployed by default mvn -N org.codehaus.mojo:versions-maven-plugin:2.2:update-child-modules -DnewVersion=${DEVELOPMENT_VERSION} git add -u git commit --amend --no-edit git push --force mvn org.codehaus.mojo:versions-maven-plugin:2.2:commit # Perform the release # Check your HTTP proxy settings in settings.xml and whether the proxy is reachable (required for deployments to the staging repo) mvn -DperformRelease=true release:perform rm izpack-native-parent/*/pom.xml.versionsBackup |
...
Say our project was at version 5.02.02-SNAPSHOT. Preparing a release will remove the -SNAPSHOT suffix, commit and tag the code on Github, then update the project version to 5.02.13-SNAPSHOT.
If you need to undo the release, revert the changes with
...
git tag --delete izpack-5.02.02
followed by
git push origin :refs/tags/izpack-5.02.02
The remote repository is resynchronized by:
...