replace gitlab:setup with db:schema:load

This commit is contained in:
Praveen Arimbrathodiyil 2016-03-14 18:58:24 +05:30
parent 8c7b3458fb
commit 6e94392784
2 changed files with 8 additions and 10 deletions

3
debian/changelog vendored
View file

@ -6,6 +6,9 @@ gitlab (8.4.3+dfsg-10) UNRELEASED; urgency=medium
* Fix typo in debian/README.Debian.
* 0038-relax-net-ssh.patch : Add dep3 header.
[ Pirate Praveen ]
* Replace gitlab:setup with db:schema:load and db:seed_fu (Closes: #815798)
-- Balasankar C <balasankarc@autistici.org> Sun, 28 Feb 2016 22:43:02 +0530
gitlab (8.4.3+dfsg-9) unstable; urgency=medium

15
debian/rake-tasks.sh vendored
View file

@ -18,16 +18,11 @@ if ! [ -f "${gitlab_app_root}/config/secrets.yml" ]; then
}
fi
echo "Initializing database..."
if [ "$(su postgres -c 'psql gitlab_production -c \\d')" = \
"No relations found." ]; then
su ${gitlab_user} -s /bin/sh -c 'bundle exec rake gitlab:setup \
RAILS_ENV=production force=yes'
su ${gitlab_user} -s /bin/sh -c 'bundle exec rake gitlab:shell:install \
REDIS_URL=redis://localhost:6379 \
SHELL_ROOT_PATH=/usr/share/gitlab-shell RAILS_ENV=production'
else
echo "gitlab_production database is not empty, skipping gitlab setup"
fi
su ${gitlab_user} -s /bin/sh -c 'bundle exec rake db:schema:load'
su ${gitlab_user} -s /bin/sh -c 'bundle exec rake db:seed_fu'
su ${gitlab_user} -s /bin/sh -c 'bundle exec rake gitlab:shell:install \
REDIS_URL=redis://localhost:6379 \
SHELL_ROOT_PATH=/usr/share/gitlab-shell RAILS_ENV=production'
echo "Precompiling assets..."
su ${gitlab_user} -s /bin/sh -c 'bundle exec rake assets:precompile RAILS_ENV=production'