mirror of
https://github.com/friendica/friendica-docker-ci
synced 2024-11-22 08:00:23 +01:00
Merge pull request #2 from nupplaphil/feat/php-cs
Add friendicaci/php-cs image
This commit is contained in:
commit
8175871572
9
php-cs/Dockerfile
Normal file
9
php-cs/Dockerfile
Normal file
|
@ -0,0 +1,9 @@
|
|||
FROM php:7.2
|
||||
|
||||
RUN apt-get update -q && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -q -y \
|
||||
git \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*
|
||||
|
||||
COPY check-php-cs.sh /check-php-cs.sh
|
11
php-cs/check-php-cs.sh
Executable file
11
php-cs/check-php-cs.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Checks the PHP CS syntax
|
||||
#
|
||||
if ! echo "${CHANGED_FILES}" | grep -qE "^(\\.php_cs(\\.dist)?|composer\\.lock)$"; then
|
||||
EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}");
|
||||
else
|
||||
EXTRA_ARGS='';
|
||||
fi
|
||||
|
||||
./bin/dev/php-cs-fixer/vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --diff --diff-format=udiff --dry-run --using-cache=no ${EXTRA_ARGS}
|
Loading…
Reference in a new issue