summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMatt Fields2018-10-07 00:29:48 -0400
committerMatt Fields2018-10-07 00:29:48 -0400
commit021e862ac7593a8014e1e66c324d79839450ba5a (patch)
treeb8e4c1b8256ee7884b13718eca855711483c0205 /PKGBUILD
parentfcec08002163466f5259b42ccd793200d2f53553 (diff)
downloadaur-021e862ac7593a8014e1e66c324d79839450ba5a.tar.gz
Update to version 2.0.1
The build scripts were split out from the main repository into the wp-cli-bundle repository, which pulls in the main repository and all command repos as dependencies. The bash completion file still lives in the main repo, and we still pull that down as a separate source file. We're using the composer script to run phpunit now, and it appears to work with PHP 7.2 just fine, so the logic around that has been removed.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD34
1 files changed, 8 insertions, 26 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 82374622d48e..bd770c8341df 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=wp-cli
-pkgver=1.5.1
-pkgrel=3
+pkgver=2.0.1
+pkgrel=1
pkgdesc="A command-line tool for managing WordPress"
url="http://wp-cli.org/"
arch=('any')
@@ -11,9 +11,9 @@ makedepends=('php-composer')
conflicts=()
replaces=()
backup=()
-source=("https://github.com/wp-cli/wp-cli/archive/v${pkgver}.tar.gz"
+source=("https://github.com/wp-cli/wp-cli-bundle/archive/v${pkgver}.tar.gz"
"https://raw.githubusercontent.com/wp-cli/wp-cli/v${pkgver}/utils/wp-completion.bash")
-md5sums=('b0287202069b6dbf16b565957cb1e735'
+md5sums=('39df7128998fad0756a8ecddb6d28f2d'
'f8acb424f1460428796451679631be86')
prepare() {
@@ -35,39 +35,21 @@ prepare() {
}
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd "${srcdir}/${pkgname}-bundle-${pkgver}"
composer install --no-interaction --prefer-dist --no-scripts && composer dump
php -dphar.readonly=0 utils/make-phar.php wp-cli.phar --quiet
}
check() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- # 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 "Notice: System PHP version incompatible with included phpunit!"
- echo -n "Checking for system install of phpunit... ";
- phpunit=0
- hash phpunit > /dev/null 2>&1 || phpunit=1
- if [[ "${phpunit}" -eq "0" ]]; then
- echo "Found!"
- echo -n "Running test suite... "
- phpunit > /dev/null
- else
- echo "Not Found... Skipping testing..."
- fi
- fi
+ cd "${srcdir}/${pkgname}-bundle-${pkgver}"
+ composer phpunit
echo -n "Binary reporting as "
php ./wp-cli.phar --version
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd "${srcdir}/${pkgname}-bundle-${pkgver}"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm655 wp-cli.phar "$pkgdir/usr/bin/wp"
cd "${srcdir}"