From 60b995bd14b98b884c8c6908738a5b6ab7fea139 Mon Sep 17 00:00:00 2001 From: lrbalt Date: Sun, 25 Nov 2007 13:54:02 +0000 Subject: [PATCH] Uses svn info to add revision nr to tracks version in footer of each page. This may help get more accurate report on version of Tracks in case of bugs. Got the code from the asset_packager plugin. Should work if svn is not available, in that case Tracks reverts to the default string '1.50-trunk'. Please note that this commit requires you to change to your environmet.rb accordingly. You can just replace the last line of environment.rb with reads TRACKS_VERSION='1.050-trunk' with the last six lines of the new environment.rb.tmpl. Do not forget to restart Tracks. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@654 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/config/environment.rb.tmpl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tracks/config/environment.rb.tmpl b/tracks/config/environment.rb.tmpl index ff8de061..2e85c77b 100644 --- a/tracks/config/environment.rb.tmpl +++ b/tracks/config/environment.rb.tmpl @@ -84,4 +84,9 @@ end MOBILE_CONTENT_TYPE = 'tracks/mobile' Mime::Type.register(MOBILE_CONTENT_TYPE, :m) -TRACKS_VERSION = '1.50-trunk' \ No newline at end of file +info = `svn info`[/Last Changed Rev: (.*?)\n/] +if info + TRACKS_VERSION = '1.50-trunk-rev'+info[/(\d+)/] +else + TRACKS_VERSION = '1.50-trunk' +end \ No newline at end of file