diff options
author | Matt Fields | 2017-12-23 15:08:20 -0500 |
---|---|---|
committer | Matt Fields | 2017-12-23 15:08:20 -0500 |
commit | c2f0c5071425467481bcacfe1222ff44628a6b69 (patch) | |
tree | e9b2ac8a0d727a4795cd28bd3e20e8bbb91fc81d /PKGBUILD | |
parent | b8780b2d0a73a609cc674318aea7d4ca4597f05d (diff) | |
download | aur-c2f0c5071425467481bcacfe1222ff44628a6b69.tar.gz |
Don't run tests for PHP 7.2+
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -1,6 +1,6 @@ pkgname=wp-cli pkgver=1.4.1 -pkgrel=4 +pkgrel=5 pkgdesc="A command-line tool for managing WordPress" url="http://wp-cli.org/" arch=('any') @@ -43,12 +43,14 @@ build() { check() { cd "${srcdir}/${pkgname}-${pkgver}" - if [[ -z $(hash phpunit > /dev/null 2>&1 || echo $?) ]]; then - echo "Using system-level phpunit..." - phpunit - else - echo "Using included phpunit..." + + # The version of PHPUnit included in the package breaks in PHP 7.2 + # Skip running the unit tests if the local PHP version is 7.2 or higher + comp=$(php -r "echo version_compare(PHP_VERSION, '7.2.0');"); + if [[ "${comp}" -eq "-1" ]]; then ./vendor/bin/phpunit + else + echo "Installed PHP version incompatible with testing library... Skipping testing!"; fi php ./wp-cli.phar --version } |