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 {
116
116
def releaseVersion
117
117
def developmentVersion
118
118
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
-
126
119
if ( manualRelease ) {
127
120
echo " Release was requested manually"
128
121
@@ -140,10 +133,13 @@ pipeline {
140
133
else {
141
134
echo " Release was triggered automatically"
142
135
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"
147
143
currentBuild. getRawBuild(). getExecutor(). interrupt(Result . NOT_BUILT )
148
144
sleep(1 ) // Interrupt is not blocking and does not take effect immediately.
149
145
return
You can’t perform that action at this time.
0 commit comments