Skip to content

Instantly share code, notes, and snippets.

View marvinrabe's full-sized avatar

Marvin Rabe marvinrabe

View GitHub Profile
@iWader
iWader / composer.sh
Last active July 23, 2024 07:47
Laravel Unit and Dusk tests on CircleCI 2.0 https://iwader.co.uk/post/laravel-unit-dusk-tests-circleci
#!/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