summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2014-11-12 13:14:13 +0200
committerValery Sizov <vsv2711@gmail.com>2014-11-12 13:14:13 +0200
commit1a7e3476351979d37cd5fa2b7b5800717487d758 (patch)
tree944564aabc35977b9771933ced239d46ddece10b /lib/tasks
parent8146271d4043a91e8f65c7af41c6c015e7d155c3 (diff)
parentc58edd7c708c39a6e7c60bd96c7f97ced370f304 (diff)
downloadgitlab-ce-1a7e3476351979d37cd5fa2b7b5800717487d758.tar.gz
Merge remote-tracking branch 'origin/master' into backup_restore_drop_sequences
Conflicts: CHANGELOG
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/gitlab/check.rake10
-rw-r--r--lib/tasks/gitlab/shell.rake4
2 files changed, 5 insertions, 9 deletions
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake
index 56e8ff44988..7ff23a7600a 100644
--- a/lib/tasks/gitlab/check.rake
+++ b/lib/tasks/gitlab/check.rake
@@ -574,20 +574,16 @@ namespace :gitlab do
Gitlab::Shell.new.version
end
- def required_gitlab_shell_version
- File.read(File.join(Rails.root, "GITLAB_SHELL_VERSION")).strip
- end
-
def gitlab_shell_major_version
- required_gitlab_shell_version.split(".")[0].to_i
+ Gitlab::Shell.version_required.split('.')[0].to_i
end
def gitlab_shell_minor_version
- required_gitlab_shell_version.split(".")[1].to_i
+ Gitlab::Shell.version_required.split('.')[1].to_i
end
def gitlab_shell_patch_version
- required_gitlab_shell_version.split(".")[2].to_i
+ Gitlab::Shell.version_required.split('.')[2].to_i
end
def has_gitlab_shell3?
diff --git a/lib/tasks/gitlab/shell.rake b/lib/tasks/gitlab/shell.rake
index 55f338add6a..202e55c89ad 100644
--- a/lib/tasks/gitlab/shell.rake
+++ b/lib/tasks/gitlab/shell.rake
@@ -4,7 +4,7 @@ namespace :gitlab do
task :install, [:tag, :repo] => :environment do |t, args|
warn_user_is_not_gitlab
- default_version = File.read(File.join(Rails.root, "GITLAB_SHELL_VERSION")).strip
+ default_version = Gitlab::Shell.version_required
args.with_defaults(tag: 'v' + default_version, repo: "https://gitlab.com/gitlab-org/gitlab-shell.git")
user = Gitlab.config.gitlab.user
@@ -76,7 +76,7 @@ namespace :gitlab do
desc "GITLAB | Build missing projects"
task build_missing_projects: :environment do
Project.find_each(batch_size: 1000) do |project|
- path_to_repo = File.join(Gitlab.config.gitlab_shell.repos_path, "#{project.path_with_namespace}.git")
+ path_to_repo = project.repository.path_to_repo
if File.exists?(path_to_repo)
print '-'
else