discourse/lib/version.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
497 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2013-02-06 03:16:51 +08:00
module Discourse
VERSION_REGEXP = /\A\d+\.\d+\.\d+(\.beta\d+)?\z/ unless defined? ::Discourse::VERSION_REGEXP
2013-08-08 06:47:04 +08:00
# work around reloader
unless defined? ::Discourse::VERSION
module VERSION #:nodoc:
2018-01-04 05:54:55 +08:00
MAJOR = 2
2020-06-25 02:00:19 +08:00
MINOR = 6
2014-08-27 03:24:07 +08:00
TINY = 0
2020-06-25 02:00:19 +08:00
PRE = 'beta1'
2013-02-06 03:16:51 +08:00
STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
end
2013-02-06 03:16:51 +08:00
end
def self.has_needed_version?(current, needed)
Gem::Version.new(current) >= Gem::Version.new(needed)
end
end