mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-12-22 21:40:08 +00:00
Break on exit-code != 0
This commit is contained in:
parent
ddc1e2b24a
commit
f9b7d5615a
15
build.php
15
build.php
@ -26,7 +26,8 @@
|
||||
EOT;
|
||||
foreach (glob('file/js/*.coffee') as $coffeeFile) {
|
||||
echo $coffeeFile."\n";
|
||||
passthru('coffee -cb '.escapeshellarg($coffeeFile));
|
||||
passthru('coffee -cb '.escapeshellarg($coffeeFile), $code);
|
||||
if ($code != 0) exit($code);
|
||||
}
|
||||
echo <<<EOT
|
||||
|
||||
@ -36,7 +37,8 @@
|
||||
EOT;
|
||||
foreach (glob('file/style/*.scss') as $sassFile) {
|
||||
echo $sassFile."\n";
|
||||
passthru('scss '.escapeshellarg($sassFile).' '.escapeshellarg(substr($sassFile, 0, -4).'css'));
|
||||
passthru('scss '.escapeshellarg($sassFile).' '.escapeshellarg(substr($sassFile, 0, -4).'css'), $code);
|
||||
if ($code != 0) exit($code);
|
||||
}
|
||||
echo <<<EOT
|
||||
|
||||
@ -45,7 +47,8 @@
|
||||
|
||||
EOT;
|
||||
chdir('file');
|
||||
passthru('tar cvf ../file.tar * --exclude=*.coffee');
|
||||
passthru('tar cvf ../file.tar * --exclude=*.coffee', $code);
|
||||
if ($code != 0) exit($code);
|
||||
echo <<<EOT
|
||||
|
||||
Building template.tar
|
||||
@ -53,7 +56,8 @@
|
||||
|
||||
EOT;
|
||||
chdir('../template');
|
||||
passthru('tar cvf ../template.tar *');
|
||||
passthru('tar cvf ../template.tar *', $code);
|
||||
if ($code != 0) exit($code);
|
||||
echo <<<EOT
|
||||
|
||||
Building timwolla.wcf.chat.tar
|
||||
@ -61,7 +65,8 @@
|
||||
|
||||
EOT;
|
||||
chdir('..');
|
||||
passthru('tar cvf timwolla.wcf.chat.tar * --exclude=file --exclude=template --exclude=build.php');
|
||||
passthru('tar cvf timwolla.wcf.chat.tar * --exclude=file --exclude=template --exclude=build.php', $code);
|
||||
if ($code != 0) exit($code);
|
||||
|
||||
if (file_exists('file.tar')) unlink('file.tar');
|
||||
if (file_exists('template.tar')) unlink('template.tar');
|
||||
|
Loading…
Reference in New Issue
Block a user