Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/296060
Change subject: Add assert-phpfalvour.sh shell script ...................................................................... Add assert-phpfalvour.sh shell script Moved it from integration/config to jenkins Bug: T124572 Change-Id: I8cfeabdfe3f786b6ae31168ca0497fbed7e0cb4f --- A bin/assert-phpflavor.sh 1 file changed, 34 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins refs/changes/60/296060/1 diff --git a/bin/assert-phpflavor.sh b/bin/assert-phpflavor.sh new file mode 100644 index 0000000..29d8c0d --- /dev/null +++ b/bin/assert-phpflavor.sh @@ -0,0 +1,34 @@ +#!/bin/bash -eu +PHP_VERSION=`php --version` + +case "{phpflavor}" in + ( 'hhvm' ) + MATCHER='^HipHop' + ;; + ( 'zend' ) + MATCHER='^Zend Engine' + ;; + ( 'php53' ) + MATCHER='^PHP 5\.3' + ;; + ( 'php55' ) + MATCHER='^PHP 5\.5' + PHP_VERSION=`php5 --version` + ;; + ( 'php56' ) + MATCHER='^PHP 5\.6' + PHP_VERSION=`php5 --version` + ;; + ( * ) + echo "Invalid phpflavor '{phpflavor}' for JJB macro 'assert-phpflavor'" + echo "Must be either 'hhvm' or 'zend'" + exit 1 + ;; + esac + + if ( echo "$PHP_VERSION" | egrep "$MATCHER" > /dev/null ); then + echo -e "php is {phpflavor}:\n\n$PHP_VERSION\n" + else + echo -e "Assertion error: php is not {phpflavor}:\n\n$PHP_VERSION\n" + exit 1 + fi -- To view, visit https://gerrit.wikimedia.org/r/296060 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8cfeabdfe3f786b6ae31168ca0497fbed7e0cb4f Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins Gerrit-Branch: master Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits