# HG changeset patch # User ymh # Date 1272989015 -7200 # Node ID a473319ea99058050d755cbfb0faa3c82272dbc5 # Parent aad3c6a520caedffb5068eced2eed657b6d9f5a6 Add version information diff -r aad3c6a520ca -r a473319ea990 build/sbin/sync_mosatags --- a/build/sbin/sync_mosatags Tue May 04 13:16:10 2010 +0200 +++ b/build/sbin/sync_mosatags Tue May 04 18:03:35 2010 +0200 @@ -88,6 +88,21 @@ echo "checkout done"; } +set_version() { + echo "===============" + version_file_tmpl=$export_path_web/config/version.yml.tmpl + version_file=$export_path_web/config/version.yml + if [ "$version" == "tip" ]; then + version_str= `hg sum | head -n 1 | tr -s " "| cut -f 2 -d" "` + else + pushd "$clone_path" + version_str=$version + popd + fi + echo "set version $version_str in $version_file" + sed "s/__VERSION__/$version_str/" $version_file_tmpl > $version_file +} + cleanup() { echo "==============="; echo "cleanup"; @@ -100,7 +115,6 @@ sync_web() { echo "==============="; - export_path_web="$export_path"/web/thdProject/; server_ip_name=$server"_web_server"; server_ip=${!server_ip_name}; sync_user_name=${server}_sync_user; @@ -116,11 +130,12 @@ fi php symfony freeze data/; popd; - echo rsync -Cvrlz --delete --filter=". -" "$export_path_web" $sync_user@$server_ip:$web_location + echo rsync -Ccvrlz --stats --delete --filter=". -" "$export_path_web" $sync_user@$server_ip:$web_location cat <V1.0 \ No newline at end of file +UniversCiné 2009 \ No newline at end of file diff -r aad3c6a520ca -r a473319ea990 web/thdProject/config/config_handlers.yml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/thdProject/config/config_handlers.yml Tue May 04 18:03:35 2010 +0200 @@ -0,0 +1,4 @@ +config/version.yml: + class: sfDefineEnvironmentConfigHandler + param: + prefix: version_ \ No newline at end of file diff -r aad3c6a520ca -r a473319ea990 web/thdProject/config/version.yml.tmpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/thdProject/config/version.yml.tmpl Tue May 04 18:03:35 2010 +0200 @@ -0,0 +1,2 @@ +all: + version: __VERSION__ \ No newline at end of file diff -r aad3c6a520ca -r a473319ea990 web/thdProject/web/backend.php --- a/web/thdProject/web/backend.php Tue May 04 13:16:10 2010 +0200 +++ b/web/thdProject/web/backend.php Tue May 04 18:03:35 2010 +0200 @@ -4,4 +4,11 @@ require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php'); $configuration = ProjectConfiguration::getApplicationConfiguration('backend', 'prod', false); +$configCache = new sfConfigCache($configuration); +try { + include($configCache->checkConfig('config/version.yml')); +} +catch(Exception $e) { + //do nothing +} sfContext::createInstance($configuration)->dispatch(); diff -r aad3c6a520ca -r a473319ea990 web/thdProject/web/backend_dev.php --- a/web/thdProject/web/backend_dev.php Tue May 04 13:16:10 2010 +0200 +++ b/web/thdProject/web/backend_dev.php Tue May 04 18:03:35 2010 +0200 @@ -10,4 +10,11 @@ require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php'); $configuration = ProjectConfiguration::getApplicationConfiguration('backend', 'dev', true); +$configCache = new sfConfigCache($configuration); +try { + include($configCache->checkConfig('config/version.yml')); +} +catch(Exception $e) { + //do nothing +} sfContext::createInstance($configuration)->dispatch(); diff -r aad3c6a520ca -r a473319ea990 web/thdProject/web/frontend_dev.php --- a/web/thdProject/web/frontend_dev.php Tue May 04 13:16:10 2010 +0200 +++ b/web/thdProject/web/frontend_dev.php Tue May 04 18:03:35 2010 +0200 @@ -10,4 +10,11 @@ require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php'); $configuration = ProjectConfiguration::getApplicationConfiguration('frontend', 'dev', true); +$configCache = new sfConfigCache($configuration); +try { + include($configCache->checkConfig('config/version.yml')); +} +catch(Exception $e) { + //do nothing +} sfContext::createInstance($configuration)->dispatch(); diff -r aad3c6a520ca -r a473319ea990 web/thdProject/web/index.php --- a/web/thdProject/web/index.php Tue May 04 13:16:10 2010 +0200 +++ b/web/thdProject/web/index.php Tue May 04 18:03:35 2010 +0200 @@ -4,6 +4,11 @@ require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php'); $configuration = ProjectConfiguration::getApplicationConfiguration('frontend', 'prod', false); +$configCache = new sfConfigCache($configuration); +try { + include($configCache->checkConfig('config/version.yml')); +} +catch(Exception $e) { + //do nothing +} sfContext::createInstance($configuration)->dispatch(); - -?>