Commit 90c7c03ebecab3fda5c7b4803efb1d85afefe1a0
1 parent
7585fdf9
Exists in
master
and in
17 other branches
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.
Showing
1 changed file
with
3 additions
and
4 deletions
Show diff stats
config/software/gitlab-shell.rb
... | ... | @@ -25,17 +25,16 @@ dependency "rsync" |
25 | 25 | source :git => "https://gitlab.com/gitlab-org/gitlab-shell.git" |
26 | 26 | |
27 | 27 | build do |
28 | + command "mkdir -p #{install_dir}/embedded/service/gitlab-shell" | |
29 | + command "#{install_dir}/embedded/bin/rsync -a --delete --exclude=.git/*** --exclude=.gitignore ./ #{install_dir}/embedded/service/gitlab-shell/" | |
28 | 30 | block do |
29 | 31 | env_shebang = "#!/usr/bin/env ruby" |
30 | 32 | `grep -r -l '^#{env_shebang}' #{project_dir}`.split("\n").each do |ruby_script| |
31 | 33 | script = File.read(ruby_script) |
32 | - next if script.start_with?("#!#{install_dir}") # Shebang looks good, skip this script | |
33 | - erb :dest => ruby_script, | |
34 | + erb :dest => ruby_script.sub(project_dir, "#{install_dir}/embedded/service/gitlab-shell"), | |
34 | 35 | :source => "ruby_script_wrapper.erb", |
35 | 36 | :mode => 0755, |
36 | 37 | :vars => {:script => script, :install_dir => install_dir} |
37 | 38 | end |
38 | 39 | end |
39 | - command "mkdir -p #{install_dir}/embedded/service/gitlab-shell" | |
40 | - command "#{install_dir}/embedded/bin/rsync -a --delete --exclude=.git/*** --exclude=.gitignore ./ #{install_dir}/embedded/service/gitlab-shell/" | |
41 | 40 | end | ... | ... |