In the following sections it will be explained the steps necessary to release a new version of the libraries. In all steps the
version to be released is referred to as <version-to-release>
, which should be replaced with appropriate version number
(e.g. 2.1.0).
The project follows the git-flow branching model. To release a new version it needs to be created a new release branch, update the version, and tag:
- Create a release branch:
git checkout -b release-<version-to-release> develop
; - Update version in:
build.gradle
file (e.g. remove-SNAPSHOT
);- source code (e.g.
@since
and@deprecated
JavaDoc tags); README.md
file (inHow to Obtain
section);
- Review that everything is correct and commit the changes:
git commit -S -m "Bump version number to <version-to-release>"
- Checkout
master
and merge the release branch:git checkout master
git merge -S --no-ff release-<version-to-release> -m "Merge branch 'release-<version-to-release>' into master"
- Tag the new version:
git tag -s v<version-to-release> -m "Version <version-to-release>"
Reintegrate the changes into develop
branch:
- Checkout develop branch:
git checkout develop
- Merge the
release-<version-to-release>
branch:git merge -S --no-ff release-<version-to-release> -m "Merge branch 'release-<version-to-release>' into develop"
- Resolve possible conflicts;
- The version can be bumped to the next developing version (e.g. increase the minor version and add
-SNAPSHOT
); - Continue with the merge (if the version was bumped mention it in the commit message);
- The version can be bumped to the next developing version (e.g. increase the minor version and add
- Resolve possible conflicts;
- Bump to the next developing version now (e.g. increase the minor version and add
-SNAPSHOT
), if not done during the merge:git commit -S -m "Bump version number to <developing-version>-SNAPSHOT"
Delete the release branch:
git branch -d release-<version-to-release>
Push the branches (develop
and master
) and tag:
git push upstream develop master v<version-to-release>
(Assuming upstream
is the zaproxy repo.)
Checkout the tagged version:
git checkout v<version-to-release>
Create the artifacts/libraries necessary for the release:
./gradlew clean build
To upload the built artifacts to OSSRH you can run the following:
./gradlew publish
Once uploaded continue with the release process in OSSRH: http://central.sonatype.org/pages/releasing-the-deployment.html
NOTE: The following properties must be defined (e.g. in file GRADLE_HOME/gradle.properties
) to successfully sign and
upload the artifacts:
signing.keyId
- the ID of the GPG key, used to sign the artifacts;ossrhUsername
- the OSSRH username;ossrhPassword
- the OSSRH password for above username.
Also, the user must have permissions to upload to GroupId org.zaproxy
.
Release in GitHub:
- Draft a new release:
- Tag:
v<version-to-release>
- Title:
Version <version-to-release>
- Description: (Add a summary of the changes done in the new version and mention the artifacts/libraries available.)
- Tag:
- Upload the libraries:
zap-api-<version-to-release>.jar
zap-clientapi-<version-to-release>.jar
- Publish release.