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
This commit is contained in:
lrbalt 2007-11-25 13:54:02 +00:00
parent 439e40693d
commit 60b995bd14

View file

@ -84,4 +84,9 @@ end
MOBILE_CONTENT_TYPE = 'tracks/mobile'
Mime::Type.register(MOBILE_CONTENT_TYPE, :m)
TRACKS_VERSION = '1.50-trunk'
info = `svn info`[/Last Changed Rev: (.*?)\n/]
if info
TRACKS_VERSION = '1.50-trunk-rev'+info[/(\d+)/]
else
TRACKS_VERSION = '1.50-trunk'
end