Commit 835077694b76e9d75f4c2f74304bb5dba8fc43c1
1 parent
8d109800
Exists in
master
and in
17 other branches
Factor out the install_dir in bundle_exec_wrapper
Showing
2 changed files
with
5 additions
and
5 deletions
Show diff stats
config/software/gitlab-core.rb
@@ -64,5 +64,5 @@ build do | @@ -64,5 +64,5 @@ build do | ||
64 | erb :dest => "#{install_dir}/bin/gitlab-rake", | 64 | erb :dest => "#{install_dir}/bin/gitlab-rake", |
65 | :source => "bundle_exec_wrapper.erb", | 65 | :source => "bundle_exec_wrapper.erb", |
66 | :mode => 0755, | 66 | :mode => 0755, |
67 | - :vars => {:command => 'rake "$@"'} | 67 | + :vars => {:command => 'rake "$@"', :install_dir => install_dir} |
68 | end | 68 | end |
config/templates/gitlab-core/bundle_exec_wrapper.erb
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | -export PATH=/opt/gitlab/bin:/opt/gitlab/embedded/bin:$PATH | 2 | +export PATH=<%= @install_dir %>/bin:<%= @install_dir %>/embedded/bin:$PATH |
3 | 3 | ||
4 | # default to RAILS_ENV=production | 4 | # default to RAILS_ENV=production |
5 | if [[ -z $RAILS_ENV ]]; then | 5 | if [[ -z $RAILS_ENV ]]; then |
6 | export RAILS_ENV=production | 6 | export RAILS_ENV=production |
7 | fi | 7 | fi |
8 | 8 | ||
9 | -gitlab_user=$(ls -lLd /opt/gitlab/embedded/service/gitlab-core/log | awk '{ print $3 }') | 9 | +gitlab_user=$(ls -lLd <%= @install_dir %>/embedded/service/gitlab-core/log | awk '{ print $3 }') |
10 | 10 | ||
11 | -cd /opt/gitlab/embedded/service/gitlab-core | ||
12 | -/opt/gitlab/embedded/bin/chpst -u $gitlab_user -U $gitlab_user /opt/gitlab/embedded/bin/bundle exec <%= @command %> | 11 | +cd <%= @install_dir %>/embedded/service/gitlab-core |
12 | +<%= @install_dir %>/embedded/bin/chpst -u $gitlab_user -U $gitlab_user <%= @install_dir %>/embedded/bin/bundle exec <%= @command %> |