serenity-bdd/serenity-core — pull request #8 by mikezx6r (2014-12-02 03:54:34+00:00)
Title: Use gradle-git for version and tagging

This leverages gradle-git plugin and its release-base plugin. Removes git command-line dependency from build as well as tasks for tagging and pushing changes.

Current config will build a SNAPSHOT if nothing is passed for release.stage.

As per notes below, -Prelease.stage= controls version. Based on the stage, it will increment the build number and possibly add rc.#, mileston.# to end.

The release tag does the tagging and push of tag. Just passing the release.stage property will affect the version used to perform the gradle actions, so can preview version numbering before executing.

Build would be gradle bintrayUpload release -Prelease.stage=final

If you like this approach, I'll also add it to the other repos.

=== If local repository is dirty
-Always builds a SNAPSHOT version.
-Will complain that 'Stage {} is not one of [SNAPSHOT] allowed for strategy snapshot.'

=== If local repository is not dirty
Set release type using property release.stage. Valid values are:
-milestone
-rc
-final
milestone creates a tag with the next version from tag + -milestone.#
rc similar, but uses rc. Cannot create a milestone after an rc
final creates a version with no endings

If want to use ssh authorization, must ensure ssh-agent contains correct key for repository being worked on.
If you experience issues, try ssh-add -D to clear identities and add the one identity for the repo in question.

The release tags the current commit, and pushes to the remote repository. It does not check if there's a new commit, so only use it if you really need to.

gradle bintrayUpload release -Prelease.stage={milestone|rc|final}