To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / 78 / 7851fb6d2c8ac3e7230e3330da36a81f831b2c06.svn-base @ 1297:0a574315af3e
History | View | Annotate | Download (876 Bytes)
| 1 | 1296:038ba2d95de8 | Chris | require 'rexml/document' |
|---|---|---|---|
| 2 | |||
| 3 | module Redmine |
||
| 4 | module VERSION #:nodoc: |
||
| 5 | MAJOR = 2 |
||
| 6 | MINOR = 2 |
||
| 7 | TINY = 4 |
||
| 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 |