Fix empty git branch and remote value issues
This commit is contained in:
parent
e65cbe52bf
commit
f0112a9aea
|
@ -233,14 +233,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.hasProperty('gitRemote').isEmpty()) {
|
||||
gitRemoteLocal = project.property('gitRemote')
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue