diff --git a/release.gradle b/release.gradle index 6d05f1a..c023c4c 100644 --- a/release.gradle +++ b/release.gradle @@ -9,8 +9,8 @@ task checkGitStatus() { throw new RuntimeException("Git repository not ready for release (${grgit.status()})") } def currentBranch = grgit.branch.current().getName() - if (currentBranch != 'master') { - throw new RuntimeException("Need to be on the master branch to release (currently on ${currentBranch})") + if (currentBranch != 'master' && !currentBranch.matches(/\d\.\d{2}/)) { + throw new RuntimeException("Need to be on a stable branch to release (currently on ${currentBranch})") } grgit.fetch() if (grgit.tag.list().any { it.name == project.version }) {