-
Notifications
You must be signed in to change notification settings - Fork 16
Upgrading to a new release
Vanessa Braganholo edited this page Nov 13, 2017
·
10 revisions
Precondition: previous release of SAPOS installed
Go to the SAPOS directory (/usr/local/sapos in this example):
$ cd /usr/local/sapos
Get new versions from Git:
$ git fetch
Remove local changes to db/schema.rb:
$ git checkout db/schema.rb
Save other local changes in the stash:
$ git stash
Check-out the desired version (4.4.0 in this example)*:
$ git checkout 4.4.0
*Obs 1.: If you are using a version < 4.0.0 and are willing to upgrade to a newer version, you will have to migrate first to version 4.0.0-migration before migrating to the desired version.
*Obs 2.: Make sure to check the requirements of the version you intent to install.
Restore local changes from stash:
$ git stash apply
Install new gems:
$ bundle install --deployment --without development test
Migrate the database:
$ bundle exec rake db:migrate RAILS_ENV="production"
Compile the assets:
$ bundle exec rake assets:clean assets:precompile RAILS_RELATIVE_URL_ROOT=/sapos RAILS_ENV="production"
Restart SAPOS:
$ touch tmp/restart.txt