forked from gitlabhq/gitlabhq
-
Notifications
You must be signed in to change notification settings - Fork 0
From 3.0 to 3.1
randx edited this page Nov 23, 2012
·
26 revisions
IMPORTANT!
In this release we moved Resque jobs under own gitlab namespace.
Despite a lot of advantages it requires from our users to replace gitolite post-receive hook with new one.
Most of projects has post-receive file as symlink to gitolite /home/git/.gitolite/hooks/post-receive
.
But some of them may have a real file. In this case you should rewrite it with symlink to gitolite hook.
I wrote a bash script which will do it automatically for you. Just make sure all path inside is valid for you
sudo service gitlab stop
# Get latest code
sudo -u gitlab -H git fetch
sudo -u gitlab -H git checkout v3.1.0
# Install new charlock_holmes
sudo gem install charlock_holmes --version '0.6.9'
# Install gems for MySQL
sudo -u gitlab -H bundle install --without development test postgres sqlite
# Migrate db
sudo -u gitlab -H bundle exec rake db:migrate RAILS_ENV=production
# Rewrite hook for gitolite 3
sudo cp ./lib/hooks/post-receive /home/git/.gitolite/hooks/common/post-receive
sudo chown git:git /home/git/.gitolite/hooks/common/post-receive
# gitolite 2
sudo cp ./lib/hooks/post-receive /home/git/share/gitolite/hooks/common/post-receive
sudo chown git:git /home/git/share/gitolite/hooks/common/post-receive
# 1. Check for valid path
sudo -u gitlab -H vim lib/support/rewrite-hooks.sh
# 2. Run script
sudo -u git -H lib/support/rewrite-hooks.sh
# Check APP Status
sudo -u gitlab -H bundle exec rake gitlab:app:status RAILS_ENV=production
sudo service gitlab start