mirror of
https://github.com/wbbaddons/Tims-Chat.git
synced 2024-10-31 14:10:08 +00:00
Replace the date with the current date during build.
This commit is contained in:
parent
bb55cfb099
commit
d261a537a2
12
build.php
12
build.php
@ -13,6 +13,10 @@
|
||||
-----------
|
||||
|
||||
EOT;
|
||||
if (file_exists('package.xml.old')) {
|
||||
file_put_contents('package.xml', file_get_contents('package.xml.old'));
|
||||
unlink('package.xml.old');
|
||||
}
|
||||
if (file_exists('file.tar')) unlink('file.tar');
|
||||
if (file_exists('template.tar')) unlink('template.tar');
|
||||
if (file_exists('acptemplate.tar')) unlink('acptemplate.tar');
|
||||
@ -70,7 +74,13 @@
|
||||
-----------------
|
||||
|
||||
EOT;
|
||||
passthru('tar cvf ../file.tar * --exclude=*.coffee --exclude=*.scss --exclude=.sass-cache', $code);
|
||||
file_put_contents('package.xml.old', file_get_contents('package.xml'));
|
||||
file_put_contents('package.xml', preg_replace('~<date>\d{4}-\d{2}-\d{2}</date>~', '<date>'.date('Y-m-d').'</date>', file_get_contents('package.xml')));
|
||||
passthru('tar cvf ../file.tar * --exclude=*.old --exclude=*.coffee --exclude=*.scss --exclude=.sass-cache', $code);
|
||||
if (file_exists('package.xml.old')) {
|
||||
file_put_contents('package.xml', file_get_contents('package.xml.old'));
|
||||
unlink('package.xml.old');
|
||||
}
|
||||
if ($code != 0) exit($code);
|
||||
echo <<<EOT
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user