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 4dfdd1b
Show file tree
Hide file tree
Showing 2 changed files with 13 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 @@ -57,6 +57,7 @@ if [ "$USE_PPAS" = "true" ]; then
sudo add-apt-repository -y ppa:staticfloat/julia-deps
sudo add-apt-repository -y ppa:ondrej/golang
sudo add-apt-repository -y ppa:avsm/ppa
sudo add-apt-repository -y ppa:ondrej/php
elif [ -n "$USE_PPAS" ]; then
for ppa in $USE_PPAS; do
sudo add-apt-repository -y ppa:$ppa
Expand Down Expand Up @@ -171,6 +172,16 @@ 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 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
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}

0 comments on commit 4dfdd1b

Please sign in to comment.