Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module VersionInfo
- #Version number file
- MAJOR_VERSION = 1
- ENHANCE_VERSION = 4
- FIX_VERSION = 0
- BETA_FLAG = true
- RC_FLAG = false
- def self.get_svn_revision
- `svn info`.split("\n")[4][/\d+/].to_i
- end
- def is_beta?
- BETA_FLAG
- end
- def is_rc?
- RC_FLAG
- end
- def self.get_version_number
- BETA_FLAG == true ? beta = " beta " : ""
- RC_FLAG == true ? rc = " release candidate " : ""
- version = "(r.#{get_svn_revision})" unless RAILS_ENV == "production"
- "#{MAJOR_VERSION}.#{ENHANCE_VERSION}.#{FIX_VERSION}#{rc}#{beta}#{version}"
- end
- def self.version_number
- print "#{MAJOR_VERSION}.#{ENHANCE_VERSION}.#{FIX_VERSION}"
- end
- end
Add Comment
Please, Sign In to add comment