Skip to content
Snippets Groups Projects
Commit 90c7c03e authored by Jacob Vosmaer's avatar Jacob Vosmaer
Browse files

Create gitlab-shell wrappers at the end

I am not sure why but this fixes a problem where the templates were
sometimes only applied in /var/cache/omnibus/src/gitlab-shell, but not
in /opt/gitlab/embedded/service/gitlab-shell.
parent 7585fdf9
No related branches found
No related tags found
2 merge requests!44Backport CentOS fixes to 6-6-pre,!43Centos Gitlab Shell
Loading
Loading
@@ -25,17 +25,16 @@ dependency "rsync"
source :git => "https://gitlab.com/gitlab-org/gitlab-shell.git"
 
build do
command "mkdir -p #{install_dir}/embedded/service/gitlab-shell"
command "#{install_dir}/embedded/bin/rsync -a --delete --exclude=.git/*** --exclude=.gitignore ./ #{install_dir}/embedded/service/gitlab-shell/"
block do
env_shebang = "#!/usr/bin/env ruby"
`grep -r -l '^#{env_shebang}' #{project_dir}`.split("\n").each do |ruby_script|
script = File.read(ruby_script)
next if script.start_with?("#!#{install_dir}") # Shebang looks good, skip this script
erb :dest => ruby_script,
erb :dest => ruby_script.sub(project_dir, "#{install_dir}/embedded/service/gitlab-shell"),
:source => "ruby_script_wrapper.erb",
:mode => 0755,
:vars => {:script => script, :install_dir => install_dir}
end
end
command "mkdir -p #{install_dir}/embedded/service/gitlab-shell"
command "#{install_dir}/embedded/bin/rsync -a --delete --exclude=.git/*** --exclude=.gitignore ./ #{install_dir}/embedded/service/gitlab-shell/"
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment