From 07a9af1281f8e2a505591665c099138f9ca055ed Mon Sep 17 00:00:00 2001 From: Remi Collet Date: May 14 2014 18:39:06 +0000 Subject: php-compatinfo: Update for now cli syntax (bz 1097659) --- diff --git a/scripts/php-compatinfo.sh b/scripts/php-compatinfo.sh index a6d26c3..87265e4 100755 --- a/scripts/php-compatinfo.sh +++ b/scripts/php-compatinfo.sh @@ -12,10 +12,24 @@ rpm -q php-bartlett-PHP-CompatInfo &> /dev/null || { exit $FR_FAIL } -cp /etc/pear/PHP_CompatInfo/phpcompatinfo.xml.dist phpcompatinfo.xml -sed -i '/consoleProgress/s/true/false/' phpcompatinfo.xml -phpcompatinfo --configuration=phpcompatinfo.xml print \ - --recursive --report full --report-file $PWD/phpci.log \ +LOG=$PWD/phpci.log + +if [ -f /etc/phpcompatinfo.json ] +then + cd BUILD/* + phpcompatinfo \ + --no-ansi --no-interaction \ + analyser:run . \ + Extension Class Constant Function Interface Namespace Trait \ + >$LOG + cd ../.. +else + cp /etc/pear/PHP_CompatInfo/phpcompatinfo.xml.dist phpcompatinfo.xml + sed -i '/consoleProgress/s/true/false/' phpcompatinfo.xml + phpcompatinfo --configuration=phpcompatinfo.xml print \ + --recursive --report full --report-file $LOG \ $PWD/BUILD/* -echo "phpci static analyze results in $PWD/phpci.log" +fi + +echo -e "$(phpcompatinfo --version) static analyze\nresults in $LOG" exit $FR_PASS