Mercurial > hg > soundsoftware-site
comparison .svn/pristine/01/019777b51c435b18c756e5573fde25c903195b68.svn-base @ 1464:261b3d9a4903 redmine-2.4
Update to Redmine 2.4 branch rev 12663
author | Chris Cannam |
---|---|
date | Tue, 14 Jan 2014 14:37:42 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1296:038ba2d95de8 | 1464:261b3d9a4903 |
---|---|
1 require 'rexml/document' | |
2 | |
3 module Redmine | |
4 module VERSION #:nodoc: | |
5 MAJOR = 2 | |
6 MINOR = 4 | |
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 |