mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10: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
|
||||
|
||||
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
|
||||
-----------------
|
||||
|
||||
EOT;
|
||||
chdir('file');
|
||||
passthru('tar cvf ../file.tar * --exclude=*.coffee --exclude=*.scss', $code);
|
||||
passthru('tar cvf ../file.tar * --exclude=*.coffee --exclude=*.scss --exclude=.sass-cache', $code);
|
||||
if ($code != 0) exit($code);
|
||||
echo <<<EOT
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user