version.rb 355 B

1234567891011121314151617181920212223
  1. # Copyright (C) 2012-2017 Zammad Foundation, http://zammad-foundation.org/
  2. class Version
  3. =begin
  4. Returns version number of application
  5. version = Version.get
  6. returns
  7. '1.3.0' # example
  8. =end
  9. def self.get
  10. File.read(Rails.root.join('VERSION')).strip
  11. rescue => e
  12. Rails.logger.error "VERSION file could not be read: #{e}"
  13. ''
  14. end
  15. end