summaryrefslogtreecommitdiff
path: root/lib/tasks/gitlab/workhorse.rake
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks/gitlab/workhorse.rake')
-rw-r--r--lib/tasks/gitlab/workhorse.rake8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/tasks/gitlab/workhorse.rake b/lib/tasks/gitlab/workhorse.rake
index baea94bf8ca..e7ac0b5859f 100644
--- a/lib/tasks/gitlab/workhorse.rake
+++ b/lib/tasks/gitlab/workhorse.rake
@@ -1,16 +1,16 @@
namespace :gitlab do
namespace :workhorse do
desc "GitLab | Install or upgrade gitlab-workhorse"
- task :install, [:dir] => :environment do |t, args|
+ task :install, [:dir, :repo] => :environment do |t, args|
warn_user_is_not_gitlab
unless args.dir.present?
abort %(Please specify the directory where you want to install gitlab-workhorse:\n rake "gitlab:workhorse:install[/home/git/gitlab-workhorse]")
end
+ args.with_defaults(repo: 'https://gitlab.com/gitlab-org/gitlab-workhorse.git')
- tag = "v#{Gitlab::Workhorse.version}"
- repo = 'https://gitlab.com/gitlab-org/gitlab-workhorse.git'
+ version = Gitlab::Workhorse.version
- checkout_or_clone_tag(tag: tag, repo: repo, target_dir: args.dir)
+ checkout_or_clone_version(version: version, repo: args.repo, target_dir: args.dir)
_, status = Gitlab::Popen.popen(%w[which gmake])
command = status.zero? ? 'gmake' : 'make'