HHH-17239 Automate maintenance releases

This commit is contained in:
Christian Beikov 2023-10-06 13:05:00 +02:00
parent ef136ae909
commit 79bbd9db1c
1 changed files with 3 additions and 3 deletions

View File

@ -58,10 +58,10 @@ pipeline {
steps {
script {
// Avoid doing a release for commits from a release
def lastCommitter = sh(script: 'git show -s --format=\'%an\'', returnStdout: true)
def secondLastCommitter = sh(script: 'git show -s --format=\'%an\' HEAD~1', returnStdout: true)
def lastCommitter = sh(script: 'git show -s --format=\'%an\'', returnStdout: true).trim()
def secondLastCommitter = sh(script: 'git show -s --format=\'%an\' HEAD~1', returnStdout: true).trim()
if (lastCommitter == 'Hibernate-CI' && secondLastCommitter == 'Hibernate-CI') {
print "INFO: Build skipped because last commits were for the previous release"
print "INFO: Release skipped because last commits were for the previous release"
currentBuild.result = 'ABORTED'
return
}