Set notification error for old PHP version.

This commit is contained in:
Tony Murray
2018-01-09 16:28:29 -06:00
parent 8acb6432c6
commit 6ebec8a810
+4 -2
View File
@@ -127,14 +127,16 @@ set_notifiable_result() {
check_php_ver() {
local branch=$(git rev-parse --abbrev-ref HEAD)
local ver_res=$(php -r "echo (int)version_compare(PHP_VERSION, '5.6.4', '<');")
if [[ "$branch" == "php53" && "$ver_res" == "0" ]]; then
if [[ "$branch" == "php53" ]] && [[ "$ver_res" == "0" ]]; then
status_run "Supported PHP version, switched back to master branch." 'git checkout master'
branch="master"
elif [[ "$branch" != "php53" && "$ver_res" == "1" ]]; then
elif [[ "$branch" != "php53" ]] && [[ "$ver_res" == "1" ]]; then
status_run "Unsupported PHP version, switched to php53 branch." 'git checkout php53'
branch="php53"
fi
set_notifiable_result phpver ${ver_res}
return ${ver_res};
}