diff --git a/ground/config_template.php b/ground/config_template.php index 43bc0ff..856abe3 100644 --- a/ground/config_template.php +++ b/ground/config_template.php @@ -8,5 +8,6 @@ return array( 'password' => 'root', 'dbname' => 'poi', ), + //'version' => trim(file_get_contents(dirname(__FILE__).'/version')), ); diff --git a/ground/controllers/IndexController.php b/ground/controllers/IndexController.php index c8248cc..de8591f 100644 --- a/ground/controllers/IndexController.php +++ b/ground/controllers/IndexController.php @@ -10,8 +10,8 @@ class IndexController extends Controller { self::addScript('/js/jquery-2.1.0.min.js'); self::addScript('http://api-maps.yandex.ru/2.0-stable/?load=package.standard&lang=ru-RU&mode=release'); - self::addScript('/js/main.js'); - self::addStyle('/css/style.css'); + self::addScript('/js/main.js?ver='.App::getConfig('version')); + self::addStyle('/css/style.css?ver='.App::getConfig('version')); $category = new Category(); diff --git a/ground/version b/ground/version new file mode 100644 index 0000000..00dedf6 --- /dev/null +++ b/ground/version @@ -0,0 +1 @@ +abcde diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..570cbe9 --- /dev/null +++ b/update.sh @@ -0,0 +1,2 @@ +git pull +git rev-parse HEAD | cut -c-5 > ground/version