Skip to content

Commit

Permalink
deps.sh: Add composer and phpstan
Browse files Browse the repository at this point in the history
Add composer and phpstan for ci
Related to coala#1426
  • Loading branch information
damngamerz committed Mar 1, 2017
1 parent 0b4cb56 commit 2a21e02
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .ci/deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,17 @@ if [ ! -e ~/.local/tailor/tailor-latest ]; then
ln -s ~/.local/tailor/tailor-* ~/.local/tailor/tailor-latest
fi

# Setting Composer and adding phpstan/phpstan.
if [ ! -e ~/vendor/bin/phpstan ]; then
sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
sudo php -r "if (hash_file('SHA384', 'composer-setup.php') === '55d6ead61b29c7bdee5cccfb50076874187bd9f21f65d8991d46ec5cc90518f447387fb9f76ebae1fbbacf329e583e30') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php composer-setup.php
sudo php -r "unlink('composer-setup.php');"
sudo apt-get install php
composer require phpstan/phpstan
export PATH="/vendor/bin/:$PATH"
fi

# making coala cache the dependencies downloaded upon first run
echo '' > dummy
coala-ci --bears CheckstyleBear --files dummy --no-config --bear-dirs bears || true
Expand Down

0 comments on commit 2a21e02

Please sign in to comment.