From 8033dea3e63e6e2745b7a22573c5b605fc56b701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 4 Apr 2012 13:29:22 +0300 Subject: [PATCH] Fixing date replacing. I fail. --- build.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build.php b/build.php index 35f0e2d..78936f2 100755 --- a/build.php +++ b/build.php @@ -74,13 +74,7 @@ Building file.tar ----------------- EOT; - file_put_contents('package.xml.old', file_get_contents('package.xml')); - file_put_contents('package.xml', preg_replace('~\d{4}-\d{2}-\d{2}~', ''.date('Y-m-d').'', 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 <<\d{4}-\d{2}-\d{2}~', ''.date('Y-m-d').'', file_get_contents('package.xml'))); passthru('tar cvf be.bastelstu.wcf.chat.tar * --exclude=file --exclude=template --exclude=acptemplate --exclude=build.php', $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); if (file_exists('file.tar')) unlink('file.tar');