Skip to content

Commit

Permalink
install composer on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcath committed Jul 3, 2018
1 parent ff831a1 commit 9d70c39
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ jobs:
name: Install PHP zip
command: sudo docker-php-ext-install zip

- run:
name: Install Composer
command: sh ./.circleci/install-composer.sh

- run:
name: Composer Install
command: composer install
command: php composer.phar install

- run:
name: Build
Expand Down
17 changes: 17 additions & 0 deletions .circleci/install-composer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

EXPECTED_SIGNATURE="$(wget -q -O - https://composer.github.io/installer.sig)"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_SIGNATURE="$(php -r "echo hash_file('SHA384', 'composer-setup.php');")"

if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
then
>&2 echo 'ERROR: Invalid installer signature'
rm composer-setup.php
exit 1
fi

php composer-setup.php --quiet
RESULT=$?
rm composer-setup.php
exit $RESULT
2 changes: 2 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# WP-Camo

[![CircleCI](https://circleci.com/gh/Ed-ITSolutions/wp-camo/tree/master.svg?style=svg)](https://circleci.com/gh/Ed-ITSolutions/wp-camo/tree/master)

![Logo](./logo.png)

_Proxies_ images via WordPress so that the origin is the sites domain.
Expand Down

0 comments on commit 9d70c39

Please sign in to comment.