summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-09-24 00:20:34 -0700
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-09-24 00:20:34 -0700
commitdaf2cf62d7f6f718cb723ae61c4ef60e5d6a711f (patch)
treef31565b1e6b98e41bcf84aedc188dc61db989eb6
parente4ba9349a39cedf0e54562b76e47a3a8e7925941 (diff)
parenta5e19c4edcb8201cb33318cc0bec06a239694451 (diff)
downloadgitlab-ce-daf2cf62d7f6f718cb723ae61c4ef60e5d6a711f.tar.gz
Merge pull request #5163 from hiroponz/update-check-script-in-stable-branch
Update check script in stable branch
-rw-r--r--lib/tasks/gitlab/check.rake29
1 files changed, 28 insertions, 1 deletions
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake
index 1e9228a3509..c445c0fbddd 100644
--- a/lib/tasks/gitlab/check.rake
+++ b/lib/tasks/gitlab/check.rake
@@ -22,6 +22,7 @@ namespace :gitlab do
check_tmp_writable
check_init_script_exists
check_init_script_up_to_date
+ check_projects_have_namespace
check_satellites_exist
check_redis_version
check_git_version
@@ -552,6 +553,32 @@ namespace :gitlab do
end
end
+ def check_projects_have_namespace
+ print "projects have namespace: ... "
+
+ unless Project.count > 0
+ puts "can't check, you have no projects".magenta
+ return
+ end
+ puts ""
+
+ Project.find_each(batch_size: 100) do |project|
+ print "#{project.name_with_namespace.yellow} ... "
+
+ if project.namespace
+ puts "yes".green
+ else
+ puts "no".red
+ try_fixing_it(
+ "Migrate global projects"
+ )
+ for_more_information(
+ "doc/update/5.4-to-6.0.md in section \"#global-projects\""
+ )
+ fix_and_rerun
+ end
+ end
+ end
# Helper methods
########################
@@ -659,7 +686,7 @@ namespace :gitlab do
end
def check_gitlab_shell
- required_version = Gitlab::VersionInfo.new(1, 7, 0)
+ required_version = Gitlab::VersionInfo.new(1, 7, 1)
current_version = Gitlab::VersionInfo.parse(gitlab_shell_version)
print "GitLab Shell version >= #{required_version} ? ... "