Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#!/usr/bin/env bashgpg --fingerprint D8406D0D82947747293778314AA394086372C20Aif [ $? -ne 0 ]; thenecho -e "\033[33mDownloading PGP Public Key...\033[0m"gpg --recv-keys D8406D0D82947747293778314AA394086372C20A# Sebastian Bergmann <sb@sebastian-bergmann.de>gpg --fingerprint D8406D0D82947747293778314AA394086372C20Aif [ $? -ne 0 ]; thenecho -e "\033[31mCould not download PGP public key for verification\033[0m"exitfifi# Let's grab the latest release and its signatureif [ ! -f phpunit.phar ]; thenwget https://phar.phpunit.de/phpunit.pharfiif [ ! -f phpunit.phar.asc ]; thenwget https://phar.phpunit.de/phpunit.phar.ascfi# Verify before runninggpg --verify phpunit.phar.asc phpunit.pharif [ $? -eq 0 ]; thenechoecho -e "\033[33mBegin Unit Testing\033[0m"# Run the testing suitephp --versionphp phpunit.phar --configuration phpunit.xml.distelseechochmod -x phpunit.pharmv phpunit.phar /tmp/bad-phpunit.pharmv phpunit.phar.asc /tmp/bad-phpunit.phar.ascecho -e "\033[31mSignature did not match! PHPUnit has been moved to /tmp/bad-phpunit.phar\033[0m"exit 1fi