Fix empty git branch and remote value issues

This commit is contained in:
Christian Beikov 2024-06-14 17:39:17 +02:00 committed by Marco Belladelli
parent 47cd06c6db
commit 2e92cfda9a
No known key found for this signature in database
GPG Key ID: DBD6E257ABE9EA3D
1 changed files with 2 additions and 2 deletions

View File

@ -225,14 +225,14 @@ def releaseChecksTask = tasks.register( "releaseChecks" ) {
String gitBranchLocal
String gitRemoteLocal
if (project.hasProperty('gitBranch')) {
if (project.hasProperty('gitBranch') && !project.property('gitBranch').isEmpty()) {
gitBranchLocal = project.property('gitBranch')
}
else {
gitBranchLocal = executeGitCommand( 'branch', '--show-current' ).trim()
}
if (project.hasProperty('gitRemote')) {
if (project.hasProperty('gitRemote') && !project.property('gitRemote').isEmpty()) {
gitRemoteLocal = project.property('gitRemote')
}
else {