2018-04-22 14:03:57 -04:00
|
|
|
#!/usr/bin/php
|
2016-03-07 14:21:17 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
include __DIR__.'/bootstrap.php';
|
|
|
|
|
|
2016-03-10 21:49:04 -05:00
|
|
|
$options = getopt('f');
|
|
|
|
|
$force = isset($options['f']); // update even if no NEEDS_UPDATE file exists
|
|
|
|
|
|
|
|
|
|
$needsUpdateFile = ROOT_DIR . '/data/writeable/NEEDS_UPDATE';
|
2018-05-21 11:49:15 -04:00
|
|
|
if (!$force && !file_exists($needsUpdateFile)) {
|
|
|
|
|
echo "No update necessary\n";
|
|
|
|
|
return;
|
2016-03-10 21:49:04 -05:00
|
|
|
}
|
|
|
|
|
|
2016-03-10 21:55:18 -05:00
|
|
|
@unlink($needsUpdateFile);
|
2016-03-10 21:49:04 -05:00
|
|
|
|
2016-03-07 14:21:17 -05:00
|
|
|
chdir(ROOT_DIR);
|
|
|
|
|
|
2026-07-27 00:10:38 +02:00
|
|
|
Shell::exec('git pull --ff-only');
|
|
|
|
|
Shell::exec('composer install --no-dev --no-interaction --optimize-autoloader --prefer-dist');
|
2016-03-07 14:21:17 -05:00
|
|
|
|
2016-04-09 16:30:07 -04:00
|
|
|
View::compileCss();
|
2016-09-02 15:40:31 -04:00
|
|
|
View::gzipAssets();
|
2017-10-31 15:35:13 -04:00
|
|
|
|
|
|
|
|
// clear cache
|
2018-02-23 00:10:19 -05:00
|
|
|
Curl::get('localhost'.Controller::CACHE_CLEAR_PATH);
|