comparison .svn/pristine/e2/e21a4b89d491f51b044f36a2083293e96a46fada.svn-base @ 1298:4f746d8966dd redmine_2.3_integration

Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author Chris Cannam
date Fri, 14 Jun 2013 09:28:30 +0100
parents 622f24f53b42
children
comparison
equal deleted inserted replaced
1297:0a574315af3e 1298:4f746d8966dd
1 require 'rexml/document'
2
3 module Redmine
4 module VERSION #:nodoc:
5 MAJOR = 2
6 MINOR = 3
7 TINY = 1
8
9 # Branch values:
10 # * official release: nil
11 # * stable branch: stable
12 # * trunk: devel
13 BRANCH = 'stable'
14
15 # Retrieves the revision from the working copy
16 def self.revision
17 if File.directory?(File.join(Rails.root, '.svn'))
18 begin
19 path = Redmine::Scm::Adapters::AbstractAdapter.shell_quote(Rails.root.to_s)
20 if `svn info --xml #{path}` =~ /revision="(\d+)"/
21 return $1.to_i
22 end
23 rescue
24 # Could not find the current revision
25 end
26 end
27 nil
28 end
29
30 REVISION = self.revision
31 ARRAY = [MAJOR, MINOR, TINY, BRANCH, REVISION].compact
32 STRING = ARRAY.join('.')
33
34 def self.to_a; ARRAY end
35 def self.to_s; STRING end
36 end
37 end