clear cache on post-commit update

This commit is contained in:
Alex Grintsvayg 2017-10-31 15:35:13 -04:00
parent 49d0809af5
commit f89b15a60e
2 changed files with 6 additions and 1 deletions

View file

@ -2,6 +2,8 @@
class Controller class Controller
{ {
const CACHE_CLEAR_PATH = '/clear-cache';
protected static $queuedFunctions = []; protected static $queuedFunctions = [];
public static function dispatch($uri) public static function dispatch($uri)
@ -97,7 +99,7 @@ class Controller
$router->post('/postcommit', 'OpsActions::executePostCommit'); $router->post('/postcommit', 'OpsActions::executePostCommit');
$router->post('/log-upload', 'OpsActions::executeLogUpload'); $router->post('/log-upload', 'OpsActions::executeLogUpload');
$router->get('/clear-cache', 'OpsActions::executeClearCache'); $router->get(static::CACHE_CLEAR_PATH, 'OpsActions::executeClearCache');
$router->any('/list/subscribe', 'MailActions::executeSubscribe'); $router->any('/list/subscribe', 'MailActions::executeSubscribe');
$router->any('/list/subscribed', 'MailActions::executeSubscribed'); $router->any('/list/subscribed', 'MailActions::executeSubscribed');

View file

@ -21,3 +21,6 @@ Shell::exec('git fetch && git reset --hard origin/master');
View::compileCss(); View::compileCss();
View::gzipAssets(); View::gzipAssets();
// clear cache
Curl::get('localhost'.Controller::CACHE_CLEAR_PATH);