Skip to content

Commit

Permalink
Allow publishing from version branches
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyrofab committed Mar 11, 2021
1 parent 5aaa6ad commit 3f5bf37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) {
Expand Down

0 comments on commit 3f5bf37

Please sign in to comment.