annotate lib/redmine/version.rb @ 1628:9c5f8e24dadc live tip

Quieten this cron script
author Chris Cannam
date Tue, 25 Aug 2020 11:38:49 +0100
parents bc47b68a9487
children
rev   line source
Chris@0 1 require 'rexml/document'
Chris@0 2
Chris@0 3 module Redmine
Chris@0 4 module VERSION #:nodoc:
Chris@1115 5 MAJOR = 2
Chris@1517 6 MINOR = 5
Chris@1517 7 TINY = 2
Chris@441 8
Chris@0 9 # Branch values:
Chris@0 10 # * official release: nil
Chris@0 11 # * stable branch: stable
Chris@0 12 # * trunk: devel
Chris@441 13 BRANCH = 'stable'
Chris@0 14
Chris@1115 15 # Retrieves the revision from the working copy
Chris@0 16 def self.revision
Chris@1568 17 return 0
Chris@1568 18 # if File.directory?(File.join(Rails.root, '.svn'))
Chris@1568 19 # begin
Chris@1568 20 # path = Redmine::Scm::Adapters::AbstractAdapter.shell_quote(Rails.root.to_s)
Chris@1568 21 # if `svn info --xml #{path}` =~ /revision="(\d+)"/
Chris@1568 22 # return $1.to_i
Chris@1568 23 # end
Chris@1568 24 # rescue
Chris@441 25 # Could not find the current revision
Chris@1568 26 # end
Chris@1568 27 # end
Chris@1568 28 # nil
Chris@0 29 end
Chris@0 30
Chris@0 31 REVISION = self.revision
Chris@441 32 ARRAY = [MAJOR, MINOR, TINY, BRANCH, REVISION].compact
Chris@441 33 STRING = ARRAY.join('.')
Chris@909 34
Chris@441 35 def self.to_a; ARRAY end
Chris@909 36 def self.to_s; STRING end
Chris@0 37 end
Chris@0 38 end