Most Popular
Recently Added
Recently Updated

Upgrading to the latest stable version of Cerb using Git

Introduction

If you installed Cerb from GitHub using Git then the process of updating to a new version is simple and straightforward. If you're using Subversion, you can switch to Git with these instructions.

You won't need to copy your framework.config.php or storage directories. Everything will be upgraded in place.

Check your license expiration

First, verify that your license is valid for the latest version.

  1. Navigate to Setup->Settings->License in Cerb.
  2. Check the date for Software Updates Expire:
    1. If it's in the future, you're all set. Continue to the next section.
    2. If it's in the past, you either need to renew your license or upgrade to the latest version covered by your license. You can check approximate release dates from our profile on Freecode.

Make a backup

Refer to the instructions here to make a recent backup:
http://cerbweb.com/book/latest/admin_guide/backups/

Updating the project files

We recommend creating a new branch for each version of the project. With a branch per version you can make an informed decision about which of your modifications and hacks to carry over. Some of your modifications to the project files may not make sense in the latest version because your feedback was implemented.

You're perfectly welcome to modify the main project files, but the officially recommended way to extend the software is to take advantage of our comprehensive plugin system. Using plugins, your changes will be easily portable between versions or environments.

Let's proceed with the upgrade by creating a new version branch:

  1. Open a console on your server and change to the directory of your Cerb installation.
  2. First, you'll want to stash your local changes to files like framework.config.php, which will make merging changes easier:
    git stash
  3. Find the name of the remote repository. In most cases this will be origin by default. You can verify this with:
    git remote
  4. Fetch the branches from the remote server:
    git fetch origin
  5. From here you can decide which version to upgrade to:
    git branch -r
  6. Add a new local branch for the desired version:
    git branch --track 6.7 origin/6.7
  7. Switch to the new version branch:
    git checkout 6.7
  8. Re-apply your local stashed changes:
    git stash pop

Note: If you'd prefer to use a single branch instead of one branch per version, you can use the stable branch instead of a version number. This branch will always contain the files for the most recent release, but you may have to manually merge conflicts if you've made changes to the code.

In the event of conflicts...

If your stashed changes were non-trivial then you may run into a situation where your changes conflict with our changes in the new version.

In such a situation you can decide to merge the changes by hand, using a command like git mergetool, or you can simply reset such files to their default state with git checkout -- <file>

Permissions

It is possible that using version control systems like Git and Subversion will modify your file permissions. You should verify that all files are owned and readable by your webserver user, and that the /storage directory and its contents are owned and readable+writeable by your webserver user.

Upgrading the database

Once your files are updated to a new version, Cerb automatically brings your database up to date and migrates any relevant data to new formats. For a major upgrade there will almost always be changes to the database. This section may not apply for smaller maintenance updates.

To start the database upgrade process you simply need to navigate to your helpdesk using a browser. You can also initiate this process manually by opening the /update page. For example, if your helpdesk is located at http://example.com/cerb/ then you would open http://example.com/cerb/update in your browser.

Note: If you aren't using friendly URLs, then you would navigate to http://example.com/cerb/index.php/update instead.

Once the database is upgraded then you'll be returned to your login form and you can resume using the helpdesk.

Purge the /install directory

Make sure the /install directory is deleted. It is possible for version control systems like Git to restore this directory during an upgrade.

Updating Community Portals

If you have Community Portals in use, like the Support Center, then it's a good idea to make sure they're using the latest version of the deployed index.php file. This file rarely changes, but you will experience subtle and difficult to diagnose problems if it does change and you don't update your portals.

  1. Navigate to Setup->Community Portals->Configure.
  2. For each Community Portal, click on it and open the Installation tab.
  3. Copy the contents of index.php to the location where your portal is installed.

All done!

You should be all set to take advantage of our latest improvements. Be sure to review the list of changes for the new version.


Properties ID: 000070   Views: 12561   Updated: 1 year ago
Filed under: