Browse Source

Fix php cs script

pull/581/head
James Cole 1 year ago
parent
commit
61fd694978
No known key found for this signature in database GPG Key ID: B49A324B7EAD6D80
  1. 19
      .ci/phpcs.sh
  2. 3
      .gitignore
  3. 0
      public/build/.gitkeep

19
.ci/phpcs.sh

@ -20,23 +20,8 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# Install composer packages
#composer install --no-scripts --no-ansi
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
# enable test .env file.
# cp .ci/.env.ci .env
OUTPUT_FORMAT=txt
EXTRA_PARAMS="-v"
if [[ $GITHUB_ACTIONS = "true" ]]
then
OUTPUT_FORMAT=gitlab
EXTRA_PARAMS="--diff --dry-run"
fi
# clean up php code
cd $SCRIPT_DIR/php-cs-fixer
composer update --quiet
@ -44,8 +29,8 @@ rm -f .php-cs-fixer.cache
PHP_CS_FIXER_IGNORE_ENV=true
./vendor/bin/php-cs-fixer fix \
--config $SCRIPT_DIR/php-cs-fixer/.php-cs-fixer.php \
--format=$OUTPUT_FORMAT \
--allow-risky=yes $EXTRA_PARAMS
--format=txt \
--allow-risky=yes
EXIT_CODE=$?

3
.gitignore

@ -16,3 +16,6 @@ resources/js/v1/node_modules
# ignore v2 node modules
resources/js/v2/node_modules
# ignore generated files.
public/build

0
public/build/.gitkeep

Loading…
Cancel
Save