Release Git Plugin
Overview
The Release Git plugin allows you to perform a full release of a project stored in a Git repository. Most of what the plugin needs comes from the .git directory or the project file; it has a single optional setting for customizing the tag name.
LATEST VERSION: 0.3.0
Loading the plugin
Here is how you load this plugin:
release = loadPlugin(id: "org.lattejava.plugin:release-git:0.3.0")
Settings
Tag name
By default, the Git tag created for a release is the project version (e.g. 1.0.8). You can override this with the tag setting to add a prefix or suffix:
release.settings.tag = "v${project.version}"
The release process
This plugin takes a number of steps to perform a full release of a project. Here are the steps:
- Check for dependencies on integration builds of other projects, libraries, etc. If there are any integration dependencies, the release is halted.
- Check for plugins that are integration builds. If there are any integration dependencies, the release is halted.
- Ensure the project is a Git project.
- Perform a
git pull. - Ensure the project has no local changes.
- Ensure the project changes have been pushed to the remote.
- Ensure there isn’t a tag in the Git repository for the version being released.
- Ensure that you are able to publish to the repository (i.e. you have logged in with
latte loginand have the correct permissions). - Execute all the project’s tests.
- Creates a tag whose name is the version being released (i.e.
1.0.8). - Publishes the project’s artifacts (publications) using the
publishWorkflowof the project.
After the release is completed, you should have a Git tag and the project’s artifacts should be published to a Latte repository.
Executing the release
This plugin provides a single method to perform the release. Here is how you call this method:
release.release()