Mercurial > hg > soundsoftware-site
annotate .svn/pristine/30/3027fca91424b88657f6c91d9b6b5ddfc109c616.svn-base @ 1519:afce8026aaeb redmine-2.4-integration
Merge from branch "live"
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 09:34:53 +0100 |
parents | b450a9d58aed |
children |
rev | line source |
---|---|
Chris@1516 | 1 require 'rexml/document' |
Chris@1516 | 2 |
Chris@1516 | 3 module Redmine |
Chris@1516 | 4 module VERSION #:nodoc: |
Chris@1516 | 5 MAJOR = 2 |
Chris@1516 | 6 MINOR = 4 |
Chris@1516 | 7 TINY = 6 |
Chris@1516 | 8 |
Chris@1516 | 9 # Branch values: |
Chris@1516 | 10 # * official release: nil |
Chris@1516 | 11 # * stable branch: stable |
Chris@1516 | 12 # * trunk: devel |
Chris@1516 | 13 BRANCH = 'stable' |
Chris@1516 | 14 |
Chris@1516 | 15 # Retrieves the revision from the working copy |
Chris@1516 | 16 def self.revision |
Chris@1516 | 17 if File.directory?(File.join(Rails.root, '.svn')) |
Chris@1516 | 18 begin |
Chris@1516 | 19 path = Redmine::Scm::Adapters::AbstractAdapter.shell_quote(Rails.root.to_s) |
Chris@1516 | 20 if `svn info --xml #{path}` =~ /revision="(\d+)"/ |
Chris@1516 | 21 return $1.to_i |
Chris@1516 | 22 end |
Chris@1516 | 23 rescue |
Chris@1516 | 24 # Could not find the current revision |
Chris@1516 | 25 end |
Chris@1516 | 26 end |
Chris@1516 | 27 nil |
Chris@1516 | 28 end |
Chris@1516 | 29 |
Chris@1516 | 30 REVISION = self.revision |
Chris@1516 | 31 ARRAY = [MAJOR, MINOR, TINY, BRANCH, REVISION].compact |
Chris@1516 | 32 STRING = ARRAY.join('.') |
Chris@1516 | 33 |
Chris@1516 | 34 def self.to_a; ARRAY end |
Chris@1516 | 35 def self.to_s; STRING end |
Chris@1516 | 36 end |
Chris@1516 | 37 end |