Files

28 lines
679 B
PHP
Raw Permalink Normal View History

2018-04-22 14:03:57 -04:00
#!/usr/bin/php
<?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
chdir(ROOT_DIR);
2019-03-19 09:25:11 -05:00
Shell::exec('git fetch && git reset --hard origin/master');
Shell::exec('git submodule update --init');
2019-04-24 15:37:12 -05:00
Shell::exec('git submodule update --recursive --remote');
2018-02-23 00:10:19 -05:00
Shell::exec('php composer.phar install');
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);