2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
2017-01-26 10:02:06 +00:00
|
|
|
|
|
|
|
class Version
|
|
|
|
|
|
|
|
=begin
|
|
|
|
|
|
|
|
Returns version number of application
|
|
|
|
|
|
|
|
version = Version.get
|
|
|
|
|
|
|
|
returns
|
|
|
|
|
|
|
|
'1.3.0' # example
|
|
|
|
|
|
|
|
=end
|
|
|
|
|
|
|
|
def self.get
|
2018-05-02 02:15:16 +00:00
|
|
|
File.read(Rails.root.join('VERSION')).strip
|
|
|
|
rescue => e
|
|
|
|
Rails.logger.error "VERSION file could not be read: #{e}"
|
2018-05-04 06:00:15 +00:00
|
|
|
''
|
2017-01-26 10:02:06 +00:00
|
|
|
end
|
|
|
|
end
|