1
0
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:
Marcus Holl 2018-05-11 09:09:24 +02:00 committed by GitHub
commit 6eefc251d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}