diff options
Diffstat (limited to 'gitlab-post.sh')
-rw-r--r-- | gitlab-post.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gitlab-post.sh b/gitlab-post.sh index 0d59f30fe030..1fd1760a3ac5 100644 --- a/gitlab-post.sh +++ b/gitlab-post.sh @@ -1,4 +1,8 @@ #!/bin/bash -(cd /usr/share/webapps/gitlab ; su -s /bin/sh gitlab -c "$(cat environment | xargs) bundle-2.7 exec rake db:migrate") +_ruby=$(pacman -Qiq gitlab | awk '{/^Depends On/ && match($0,/\<ruby[0-9.]*\>/,a)}END{print a[0]}') +_bundle=$(pacman -Qlq "$_ruby" | grep '/usr/bin/bundle\>') + +cd /usr/share/webapps/gitlab +su -s /bin/sh gitlab -c "$(xargs < environment ) $_bundle exec rake db:migrate" systemctl start gitlab.target |