mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-23 17:47:26 +00:00
28 lines
667 B
PHP
Executable file
28 lines
667 B
PHP
Executable file
#!/usr/bin/php
|
|
<?php
|
|
|
|
include __DIR__.'/bootstrap.php';
|
|
|
|
$options = getopt('f');
|
|
$force = isset($options['f']); // update even if no NEEDS_UPDATE file exists
|
|
|
|
$needsUpdateFile = ROOT_DIR . '/data/writeable/NEEDS_UPDATE';
|
|
if (!$force && !file_exists($needsUpdateFile)) {
|
|
echo "No update necessary\n";
|
|
return;
|
|
}
|
|
|
|
@unlink($needsUpdateFile);
|
|
|
|
chdir(ROOT_DIR);
|
|
|
|
Shell::exec('git fetch && git reset --hard origin/master');
|
|
Shell::exec('git submodule update --init');
|
|
Shell::exec('git pull --recurse-submodules');
|
|
Shell::exec('php composer.phar install');
|
|
|
|
View::compileCss();
|
|
View::gzipAssets();
|
|
|
|
// clear cache
|
|
Curl::get('localhost'.Controller::CACHE_CLEAR_PATH);
|