Fix empty git branch and remote value issues
This commit is contained in:
parent
47cd06c6db
commit
2e92cfda9a
|
@ -225,14 +225,14 @@ def releaseChecksTask = tasks.register( "releaseChecks" ) {
|
||||||
String gitBranchLocal
|
String gitBranchLocal
|
||||||
String gitRemoteLocal
|
String gitRemoteLocal
|
||||||
|
|
||||||
if (project.hasProperty('gitBranch')) {
|
if (project.hasProperty('gitBranch') && !project.property('gitBranch').isEmpty()) {
|
||||||
gitBranchLocal = project.property('gitBranch')
|
gitBranchLocal = project.property('gitBranch')
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
gitBranchLocal = executeGitCommand( 'branch', '--show-current' ).trim()
|
gitBranchLocal = executeGitCommand( 'branch', '--show-current' ).trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (project.hasProperty('gitRemote')) {
|
if (project.hasProperty('gitRemote') && !project.property('gitRemote').isEmpty()) {
|
||||||
gitRemoteLocal = project.property('gitRemote')
|
gitRemoteLocal = project.property('gitRemote')
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue