Mercurial > hg > soundsoftware-site
comparison .svn/pristine/ec/ec460767d3af7062be69f896aa32911492030feb.svn-base @ 1517:dffacf8a6908 redmine-2.5
Update to Redmine SVN revision 13367 on 2.5-stable branch
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 09:29:00 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1516:b450a9d58aed | 1517:dffacf8a6908 |
---|---|
1 require 'rexml/document' | |
2 | |
3 module Redmine | |
4 module VERSION #:nodoc: | |
5 MAJOR = 2 | |
6 MINOR = 5 | |
7 TINY = 2 | |
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 |