2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://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
|