Commit b4584bdc4dee37a343815c78cd51a2ee399a0ab2
Exists in
master
and in
17 other branches
Merge branch 'rake_wrapper' into 'master'
Rake Wrapper
Showing
2 changed files
with
21 additions
and
1 deletions
Show diff stats
config/software/gitlab-core.rb
| ... | ... | @@ -39,4 +39,21 @@ build do |
| 39 | 39 | bundle "install --without mysql development test --path=#{install_dir}/embedded/service/gem" |
| 40 | 40 | command "mkdir -p #{install_dir}/embedded/service/gitlab-core" |
| 41 | 41 | command "#{install_dir}/embedded/bin/rsync -a --delete --exclude=.git/*** --exclude=.gitignore ./ #{install_dir}/embedded/service/gitlab-core/" |
| 42 | + block do | |
| 43 | + open("#{install_dir}/bin/gitlab-rake", "w") do |file| | |
| 44 | + file.print <<-EOH | |
| 45 | +#!/bin/bash | |
| 46 | +export PATH=/opt/gitlab/bin:/opt/gitlab/embedded/bin:$PATH | |
| 47 | + | |
| 48 | +# default to RAILS_ENV=production | |
| 49 | +if [[ -z $RAILS_ENV ]]; then | |
| 50 | + export RAILS_ENV=production | |
| 51 | +fi | |
| 52 | + | |
| 53 | +cd /opt/gitlab/embedded/service/gitlab-core | |
| 54 | +/opt/gitlab/embedded/bin/chpst -u git -U git /opt/gitlab/embedded/bin/bundle exec rake "$@" | |
| 55 | +EOH | |
| 56 | + end | |
| 57 | + end | |
| 58 | + command "chmod +x #{install_dir}/bin/gitlab-rake" | |
| 42 | 59 | end | ... | ... |
package-scripts/gitlab/postinst
| ... | ... | @@ -12,7 +12,10 @@ function error_exit |
| 12 | 12 | exit 1 |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | -ln -sf /opt/gitlab/bin/gitlab-ctl /usr/bin || error_exit "Could not symlink gitlab-ctl in /usr/bin" | |
| 15 | +for command in gitlab-ctl gitlab-rake | |
| 16 | +do | |
| 17 | + ln -sf /opt/gitlab/bin/$command /usr/bin || error_exit "Could not symlink $command in /usr/bin" | |
| 18 | +done | |
| 16 | 19 | |
| 17 | 20 | echo "Thank you for installing GitLab!" |
| 18 | 21 | echo "You can configure GitLab for your system by running the following command:" | ... | ... |