Releasing - WonderCsabo/androidannotations GitHub Wiki
This page is addressed to AndroidAnnotations developers. It documents the steps that should be followed when creating a new AndroidAnnotations release.
- Add the user informations to your Settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>ossrh</id>
<username>USERNAME</username>
<password>PASSWORD</password>
</server>
</servers>
<profiles>
<profile>
<id>AA</id>
<properties>
<gpg.passphrase>AA_GPG_PASSPHRASE</gpg.passphrase>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>AA</activeProfile>
</activeProfiles>
</settings>
- To create a new release, simply enter the following commands, after replacing
<release-ver>
(e.g. 2.0) and<next-dev-ver>
(e.g 2.1-SNAPSHOT) with the good values.
git checkout develop
git pull
git checkout -b release/<release-ver>
./mvnw clean release:prepare -DdevelopmentVersion=<next-ver> -DreleaseVersion=<release-ver> -Dtag=androidannotations-<release-ver>
./mvnw release:perform
git checkout master
git merge --no-ff androidannotations-<release-ver>
git checkout develop
git merge --no-ff release/<release-ver>
git push origin master develop
git branch -d release/<release-ver>
git push origin :release/<release-ver>
Note: On Windows using WSL you might need to call
export GPG_TTY=$(tty)
before doing./mvnw release:perform
to avoidgpg: signing failed: Inappropriate ioctl for device
. See https://github.com/keybase/keybase-issues/issues/2798
Then you need to close and release the staging repository on Sonatype Nexus OSS. Once done, it will be synced to Maven Central a few hours later.
- Update the RoboGuiceExample project with the new AndroidAnnotations snapshot version number : update the version in the build.gradle file.
- Update the Maven project with the new AndroidAnnotations snapshot version number: update the version in the POM.
- Update the Gradle project with the new AndroidAnnotations snapshot version number: update the version in the build.gradle file.
- Update the Kotlin project with the new AndroidAnnotations snapshot version number: update the version in the build.gradle file.
- Update the Release Notes wiki page with this release notes (new features, bug fixes, etc)
- Update the sidebar
- Listing the contributors on a release:
git log --format='%aN <%aE>' androidannotations-2.6...develop | awk '{arr[$0]++} END{for (i in arr){print arr[i], i;}}' | sort -rn
- Update the welcome page if necessary
- Create a hotfix branch from master
git checkout -b hotfix/<hotfix-ver> master
- Update the version number
./mvnw versions:set -DnewVersion=<hotfix-ver>-SNAPSHOT -DgenerateBackupPoms=false
- Make the required changes
- Run
./mvnw license:check
to check the license headers - Commit the needed changes
- Create a new hotfix release
./mvnw clean release:prepare -DdevelopmentVersion=<develop-version>-SNAPSHOT -DreleaseVersion=<hotfix-ver> -Dtag=androidannotations-<hotfix-ver>
./mvnw release:perform
- Merge hotfix back on master:
git checkout master && git merge hotfix/<hotfix-ver>~1 --no-ff
- Merge the changes back on develop
git checkout develop && git merge hotfix/<hotfix-ver> --no-ff
- Delete the hotfix branch
git branch -d hotfix/<hotfix-ver>
- Push the whole thing:
git push origin master
git push origin develop
git push origin :hotfix/<hotfix-ver>
git push --tags
Then you need to close and release the staging repository on Sonatype Nexus OSS. Once done, it will be synced to Maven Central a few hours later.