-
Notifications
You must be signed in to change notification settings - Fork 10
Release guide
Enrico Olivelli edited this page Sep 2, 2020
·
6 revisions
Assume that your git 'origin' remote is http://github.com/diennea/docetproject
git remote -v
Set up and cache Github credentials (you need to have committer privileges on this repository):
git checkout master
git push --dry-run
Ensure you have at least JDK11
$JAVA_HOME/bin/java -version
In case you are performing new major release, for instance you are releasing 0.7.0, so current master should be 0.7.0-SNAPSHOT, new master will be 0.8.0-SNAPSHOT, you will be creating a release/0.7 branch and a v0.7.0 tag
In case you are performing a minor release, for instance you are releasing 0.7.1, you will be starting from release/0.7 branch, with version 0.7.1-SNAPSHOT, new version on that branch will be 0.7.2-SNAPSHOT and at the end you will have a v0.7.1 tag
BRANCH_NAME=release/1.11
RELEASE_DEVELOPMENT_VERSION=1.11.1-SNAPSHOT
RELEASE_VERSION=1.11.0
MASTER_DEVELOPMENT_VERSION=1.12.0-SNAPSHOT
TAG=v$RELEASE_VERSION
JAVA_HOME=/usr/java/current11
git checkout master
git pull --rebase
mvn release:clean
mvn release:branch -DbranchName=$BRANCH_NAME -DdevelopmentVersion=$MASTER_DEVELOPMENT_VERSION
From now you can expect:
- on master pom.xml version is MASTER_DEVELOPMENT_VERSION
- you have a release branch named BRANCH_NAME
- in BRANCH_NAME pom.xml version is RELEASE_DEVELOPMENT_VERSION
BRANCH_NAME=release/0.7
RELEASE_DEVELOPMENT_VERSION=0.7.2-SNAPSHOT
RELEASE_VERSION=0.7.1
TAG=v$RELEASE_VERSION
git checkout $BRANCH_NAME
git pull
git push --dry-run
git checkout $BRANCH_NAME
mvn release:prepare -DautoVersionSubmodules=true -DreleaseVersion=$RELEASE_VERSION -Dtag=$TAG -DdevelopmentVersion=$RELEASE_DEVELOPMENT_VERSION -Darguments='-DskipTests=true'
From now you can expect:
- in BRANCH_NAME pom.xml version is RELEASE_DEVELOPMENT_VERSION
- you have a new tag named TAG
- in TAG version.xml is RELEASE_VERSION
Checklist:
- You need to have your OSSRH credentials written in settings.xml
- You need to have a valid GPG Private Key
mvn release:perform -DreleaseProfiles=ossrh -Darguments='-DskipTests=true'