mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2025-01-09 00:20:08 +00:00
Adding PHP Syntax Check to build.php
This commit is contained in:
parent
6e89b04751
commit
f26fa50bd6
26
build.php
26
build.php
@ -43,12 +43,34 @@
|
|||||||
}
|
}
|
||||||
echo <<<EOT
|
echo <<<EOT
|
||||||
|
|
||||||
|
Checking PHP for Syntax Errors
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
EOT;
|
||||||
|
chdir('file');
|
||||||
|
$check = null;
|
||||||
|
$check = function ($folder) use (&$check) {
|
||||||
|
if (is_file($folder)) {
|
||||||
|
if (substr($folder, -4) === '.php') {
|
||||||
|
passthru('php -l '.escapeshellarg($folder), $code);
|
||||||
|
if ($code != 0) exit($code);
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$files = glob($folder.'/*');
|
||||||
|
foreach ($files as $file) {
|
||||||
|
$check($file);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
$check('.');
|
||||||
|
echo <<<EOT
|
||||||
|
|
||||||
Building file.tar
|
Building file.tar
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
EOT;
|
EOT;
|
||||||
chdir('file');
|
passthru('tar cvf ../file.tar * --exclude=*.coffee --exclude=*.scss --exclude=.sass-cache', $code);
|
||||||
passthru('tar cvf ../file.tar * --exclude=*.coffee --exclude=*.scss', $code);
|
|
||||||
if ($code != 0) exit($code);
|
if ($code != 0) exit($code);
|
||||||
echo <<<EOT
|
echo <<<EOT
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user