File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -116,13 +116,6 @@ pipeline {
116116 def releaseVersion
117117 def developmentVersion
118118
119- def lastCommitter = sh(script : ' git show -s --format=\' %an\' ' , returnStdout : true ). trim()
120- def secondLastCommitter = sh(script : ' git show -s --format=\' %an\' HEAD~1' , returnStdout : true ). trim()
121- def isCiLastCommiter = lastCommitter == ' Hibernate-CI' && secondLastCommitter == ' Hibernate-CI'
122-
123- echo " Last two commits were performed by '${ lastCommitter} '/'${ secondLastCommitter} '."
124- echo " Is 'Hibernate-CI' the last commiter: '${ isCiLastCommiter} '."
125-
126119 if ( manualRelease ) {
127120 echo " Release was requested manually"
128121
@@ -140,10 +133,13 @@ pipeline {
140133 else {
141134 echo " Release was triggered automatically"
142135
143- // Avoid doing an automatic release for commits from a release
144-
145- if (isCiLastCommiter) {
146- print " INFO: Automatic release skipped because last commits were for the previous release"
136+ // Avoid doing an automatic release if there are no "releasable" commits since the last release (see release scripts for determination)
137+ def releasableCommitCount = sh(
138+ script : " .release/scripts/count-releasable-commits.sh ${ env.PROJECT} " ,
139+ returnStdout : true
140+ ). trim(). toInteger()
141+ if ( releasableCommitCount <= 0 ) {
142+ print " INFO: Automatic release skipped because no releasable commits were pushed since the previous release"
147143 currentBuild. getRawBuild(). getExecutor(). interrupt(Result . NOT_BUILT )
148144 sleep(1 ) // Interrupt is not blocking and does not take effect immediately.
149145 return
You can’t perform that action at this time.
0 commit comments