version.rb 350 B

1234567891011121314151617181920212223
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://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. Rails.root.join('VERSION').read.strip
  11. rescue => e
  12. Rails.logger.error "VERSION file could not be read: #{e}"
  13. ''
  14. end
  15. end