mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-01-18 05:18:24 +02:00
Merge pull request #146 from marcusholl/pr/gitUtilsAvoidDuplicateShellCode
GitUtils: avoid duplicate shell code
This commit is contained in:
commit
6eefc251d1
@ -2,7 +2,7 @@ package com.sap.piper
|
||||
|
||||
String getGitCommitIdOrNull() {
|
||||
if (fileExists('.git')) {
|
||||
return sh(returnStdout: true, script: 'git rev-parse HEAD').trim()
|
||||
return getGitCommitId()
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user