pipeline(symfony): fix php-cs-fixer-stage

This commit is contained in:
wpetit 2022-05-18 17:33:25 +02:00
parent ed1fb84ea9
commit 8699ec0a9d
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ def call(String baseImage = "ubuntu:22.04") {
sh '''
CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB "HEAD~..HEAD" | fgrep ".php" | tr "\n" " ")
if ! echo "${CHANGED_FILES}" | grep -qE "^(\\.php-cs-fixer(\\.dist)\\.php?|composer\\.lock)$"; then EXTRA_ARGS=$(printf -- '--path-mode=intersection -- %s' "${CHANGED_FILES}"); else EXTRA_ARGS=''; fi
php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --dry-run --using-cache=no --format junit > php-cs-fixer.xml ${EXTRA_ARGS}
php-cs-fixer fix --config=.php-cs-fixer.dist.php -v --dry-run --using-cache=no --format junit ${EXTRA_ARGS} > php-cs-fixer.xml || true
'''
def report = sh(script: "junit2md php-cs-fixer.xml", returnStdout: true)
if (env.CHANGE_ID) {