Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 803 Bytes

File metadata and controls

28 lines (19 loc) · 803 Bytes

gradle-test-commit-revert-plugin

A small gradle plugin to implement the Test-Commit-Revert workflow.

If :test passes successfully, all changes are staged and committed, else all changes are reverted.

Usage

Include the plugin in your build.gradle

plugins {
  id "uk.co.probablyfine.gradle.test-commit-revert" version "0.3.0"
}

By default, the commit command is git commit --all --message TCR and the revert command is git reset --hard HEAD.

You can override these in your build.gradle if you, say, use Mercurial as your VCS.

testCommitRevert {
  commitCommand = 'hg commit -A -m TCR'
  revertCommand = 'hg update --clean'
}