Guest User

Untitled

a guest
Apr 27th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. module VersionInfo
  2. #Version number file
  3. MAJOR_VERSION = 1
  4. ENHANCE_VERSION = 4
  5. FIX_VERSION = 0
  6. BETA_FLAG = true
  7. RC_FLAG = false
  8.  
  9. def self.get_svn_revision
  10. `svn info`.split("\n")[4][/\d+/].to_i
  11. end
  12.  
  13. def is_beta?
  14. BETA_FLAG
  15. end
  16.  
  17. def is_rc?
  18. RC_FLAG
  19. end
  20.  
  21. def self.get_version_number
  22. BETA_FLAG == true ? beta = " beta " : ""
  23. RC_FLAG == true ? rc = " release candidate " : ""
  24. version = "(r.#{get_svn_revision})" unless RAILS_ENV == "production"
  25. "#{MAJOR_VERSION}.#{ENHANCE_VERSION}.#{FIX_VERSION}#{rc}#{beta}#{version}"
  26. end
  27.  
  28. def self.version_number
  29. print "#{MAJOR_VERSION}.#{ENHANCE_VERSION}.#{FIX_VERSION}"
  30. end
  31. end
Add Comment
Please, Sign In to add comment