mirror of
https://github.com/SAP/jenkins-library.git
synced 2024-12-14 11:03:09 +02:00
Merge pull request #260 from marcusholl/pr/artifactSetVersionInsideWorktree
[refactoring] artifactSetVersion: use gitUtils#insideWorkTree
This commit is contained in:
commit
8c84bc67cd
@ -31,7 +31,7 @@ def call(Map parameters = [:], Closure body = null) {
|
||||
|
||||
def gitUtils = parameters.juStabGitUtils ?: new GitUtils()
|
||||
|
||||
if (fileExists('.git')) {
|
||||
if (gitUtils.insideWorkTree()) {
|
||||
if (sh(returnStatus: true, script: 'git diff --quiet HEAD') != 0)
|
||||
error "[${STEP_NAME}] Files in the workspace have been changed previously - aborting ${STEP_NAME}"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user