diff options
Diffstat (limited to 'scripts/prepare_build.sh')
-rw-r--r-- | scripts/prepare_build.sh | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/scripts/prepare_build.sh b/scripts/prepare_build.sh index 206d62dbc78..75a3cea0448 100644 --- a/scripts/prepare_build.sh +++ b/scripts/prepare_build.sh @@ -11,7 +11,7 @@ fi # Only install knapsack after bundle install! Otherwise oddly some native # gems could not be found under some circumstance. No idea why, hours wasted. -retry gem install knapsack +retry gem install knapsack --no-ri --no-rdoc cp config/gitlab.yml.example config/gitlab.yml sed -i 's/bin_path: \/usr\/bin\/git/bin_path: \/usr\/local\/bin\/git/' config/gitlab.yml @@ -49,20 +49,8 @@ sed -i 's/localhost/redis/g' config/redis.queues.yml cp config/redis.shared_state.yml.example config/redis.shared_state.yml sed -i 's/localhost/redis/g' config/redis.shared_state.yml -# Some tasks (e.g. db:seed_fu) need to have a properly-configured database -# user but not necessarily a full schema loaded -if [ "$CREATE_DB_USER" != "false" ]; then - if [ "$GITLAB_DATABASE" = 'postgresql' ]; then - . scripts/create_postgres_user.sh - else - . scripts/create_mysql_user.sh - fi -fi - if [ "$SETUP_DB" != "false" ]; then - bundle exec rake db:drop db:create db:schema:load db:migrate - - if [ "$GITLAB_DATABASE" = "mysql" ]; then - bundle exec rake add_limits_mysql - fi + setup_db +elif getent hosts postgres || getent hosts mysql; then + setup_db_user_only fi |