summaryrefslogtreecommitdiff
path: root/lib/gitlab.rb
diff options
context:
space:
mode:
authorBrandon Labuschagne <blabuschagne@gitlab.com>2019-01-29 20:45:47 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2019-01-29 20:45:47 +0000
commitdef2b548d2ee5e33948350f7e3f47d485e35e22e (patch)
tree6d64151e6b80138cb2f191b7fe7ca946a5df78e0 /lib/gitlab.rb
parent5652533a9cd1f64a932c565e3a0f9707ceec766b (diff)
downloadgitlab-ce-def2b548d2ee5e33948350f7e3f47d485e35e22e.tar.gz
Revert the "What's new" feature
Diffstat (limited to 'lib/gitlab.rb')
-rw-r--r--lib/gitlab.rb48
1 files changed, 8 insertions, 40 deletions
diff --git a/lib/gitlab.rb b/lib/gitlab.rb
index b91394f7f58..e073450283b 100644
--- a/lib/gitlab.rb
+++ b/lib/gitlab.rb
@@ -7,6 +7,14 @@ module Gitlab
Pathname.new(File.expand_path('..', __dir__))
end
+ def self.version_info
+ Gitlab::VersionInfo.parse(Gitlab::VERSION)
+ end
+
+ def self.pre_release?
+ VERSION.include?('pre')
+ end
+
def self.config
Settings
end
@@ -27,52 +35,12 @@ module Gitlab
end
end
- def self.version_info
- Gitlab::VersionInfo.parse(Gitlab::VERSION)
- end
-
COM_URL = 'https://gitlab.com'.freeze
APP_DIRS_PATTERN = %r{^/?(app|config|ee|lib|spec|\(\w*\))}
SUBDOMAIN_REGEX = %r{\Ahttps://[a-z0-9]+\.gitlab\.com\z}
VERSION = File.read(root.join("VERSION")).strip.freeze
INSTALLATION_TYPE = File.read(root.join("INSTALLATION_TYPE")).strip.freeze
- def self.pre_release?
- VERSION.include?('pre')
- end
-
- def self.final_release?
- !VERSION.include?('rc') && !pre_release?
- end
-
- def self.minor_release
- "#{version_info.major}.#{version_info.minor}"
- end
-
- def self.prev_minor_release
- "#{version_info.major}.#{version_info.minor - 1}"
- end
-
- def self.prev_major_release
- "#{version_info.major.to_i - 1}"
- end
-
- def self.new_major_release?
- version_info.minor.to_i.zero?
- end
-
- def self.previous_release
- if version_info.minor_version?
- if version_info.patch_version?
- minor_release
- else
- prev_minor_release
- end
- else
- prev_major_release
- end
- end
-
def self.com?
# Check `gl_subdomain?` as well to keep parity with gitlab.com
Gitlab.config.gitlab.url == COM_URL || gl_subdomain?