HHH-17239 Automate maintenance releases

This commit is contained in:
Christian Beikov 2023-10-04 21:28:08 +02:00
parent cc3dd1204f
commit e439b90f8e
2 changed files with 3 additions and 4 deletions

View File

@ -1,7 +1,6 @@
apply from: rootProject.file( 'gradle/base-information.gradle' )
task release {
dependsOn ':release:releaseChecks'
mustRunAfter ':release:releaseChecks'
enabled !project.ormVersion.isSnapshot
}

View File

@ -229,14 +229,14 @@ def releaseChecksTask = tasks.register( "releaseChecks" ) {
gitBranchLocal = project.property('gitBranch')
}
else {
gitBranchLocal = executeGitCommand( 'branch', '--show-current' )
gitBranchLocal = executeGitCommand( 'branch', '--show-current' ).trim()
}
if (project.hasProperty('gitRemote')) {
gitRemoteLocal = project.property('gitRemote')
}
else {
final String remotes = executeGitCommand( 'remote', 'show' )
final String remotes = executeGitCommand( 'remote', 'show' ).trim()
final List<String> tokens = remotes.tokenize()
if ( tokens.size() != 1 ) {
throw new GradleException( "Could not determine `gitRemote` property for `releaseChecks` tasks." )