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