This document describes the release process designed and implemented for gradle-clover-plugin
. Its main purpose is to explain to developers and maintainers how to prepare and release a new version of this plugin.
The release process uses some external libraries and services described in detail below.
The org.ajoberstar.reckon
Gradle plugin is used to automatically determine the project version. org.ajoberstar.reckon
is applied in the main build.gradle and configured in gradle/release.gradle. Please refer to the plugin documentation for more details.
The gradle-git-publish
Gradle plugin is used to publish the documentation to gh-pages
branch. It is applied and configured in the gradle/documentation.gradle file.
Travis CI service is used as our current CI/CD server. Build and deploy jobs are configured in .travis.yml file. Please refer its documentation for more details.
Bintray service is used to publish plugin versions. With BintrayPlugin artifacts are uploaded to a remote reposiotry. Plugin configuration is in the gradle/publishing.gradle file.
The release process is automated to some extent. The following steps describe the workflow.
- Developer updates
RELEASE_NOTES.md
with new planned version. - Developer commits all changes in local working copy.
- Developer triggers new version release using the following command:
./gradlew reckonTagPush -Preckon.stage=final -Preckon.scope=[SCOPE]
where [SCOPE]
can be one of: major
, minor
or patch
, and determines which part of the version string <major>.<minor>.<patch>
will be increased.
- Gradle executes a build on developer's machine which calculates new version string, creates new tag with it and pushes to the
origin
. - When Gradle build is finished, developer's work is done and the rest of the release process is automated.
- After push to the
origin
, Travis detects new tag and triggers a build. - Travis is instructed to execute release stage when on Git tag.
- In this stage Gradle script assembles plugin binaries (with new version) and uploads them to Bintray (credentials are stored as secure variables in Travis). Also JavaDoc is published to
gh-pages
branch (GitHub username and access token are also stored as secure variables).