Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2019-07-29 18:15:46 +0300
committerLin Jen-Shin <godfat@godfat.org>2019-07-29 18:15:46 +0300
commitdbe3b9848b884ca9705259110edf58e801c89e5e (patch)
tree771209d6e20b643d852ac684142609cf4a896b4b /lib
parent16d4dbde17d77e8b2556cac6701f178e2d79243c (diff)
parentd7a4c1d2a5f395ca6ddb2dc2608ac33ccebf8a74 (diff)
Merge branch 'resolve-scripts-differences' into 'master'
Backport EE changes made to the scripts/ directory See merge request gitlab-org/gitlab-ce!31015
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab.rb4
-rw-r--r--lib/tasks/gitlab/db.rake8
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/gitlab.rb b/lib/gitlab.rb
index c62d1071dba..d9d8dcf7900 100644
--- a/lib/gitlab.rb
+++ b/lib/gitlab.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true
-require_dependency File.expand_path('gitlab/popen', __dir__)
+require 'pathname'
module Gitlab
def self.root
@@ -61,7 +61,7 @@ module Gitlab
def self.ee?
@is_ee ||=
- if ENV['IS_GITLAB_EE'].present?
+ if ENV['IS_GITLAB_EE'] && !ENV['IS_GITLAB_EE'].empty?
Gitlab::Utils.to_boolean(ENV['IS_GITLAB_EE'])
else
# We may use this method when the Rails environment is not loaded. This
diff --git a/lib/tasks/gitlab/db.rake b/lib/tasks/gitlab/db.rake
index d054959e05e..1961f64659c 100644
--- a/lib/tasks/gitlab/db.rake
+++ b/lib/tasks/gitlab/db.rake
@@ -70,5 +70,13 @@ namespace :gitlab do
Gitlab::DowntimeCheck.new.check_and_print(migrations)
end
+
+ desc 'Sets up EE specific database functionality'
+
+ if Gitlab.ee?
+ task setup_ee: %w[geo:db:drop geo:db:create geo:db:schema:load geo:db:migrate]
+ else
+ task :setup_ee
+ end
end
end