From 8d1ef522dd5d6a6a620440717e01b5f40fe92ddf Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Mon, 7 Apr 2014 17:43:30 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BE=D0=BD=D1=82=D1=80=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=20=D0=B2=D0=B5=D1=80=D1=81=D0=B8=D0=B8=20=D0=B8=D0=B7=20?= =?UTF-8?q?=D1=85=D0=B5=D1=88=D0=B0=20git?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/config_template.php | 1 + ground/controllers/IndexController.php | 4 ++-- ground/version | 1 + update.sh | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 ground/version create mode 100755 update.sh 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