Public release procedure

James Titcumb edited this page Jan 19, 2017 · 23 revisions

This is the procedure that needs to be carried out to update the public release version on

Preparing the build

To do a release, first generate and test browscap.ini files using the Browscap tool. Make sure they work :).

When you are happy, increment the build number in the BUILD_NUMBER file. This is an important step, but is temporary until Compomser supports SemVer 2.0.0 (see issue #27). In the future, we will use SemVer 2.0.0 build numbers.

Generate changelog notes for the tag and release notes using changelog_generator.

Create & push a signed tag for the build number, e.g.:

$ git push
$ git tag -s 6007
$ git push origin 6007

Once pushed, head to GitHub, and create a new release for the tag you just pushed. Use the same release notes you added to the tag, generated by changelog_generator above.

Update the version that offers

Once happy, check out the latest browscap/browscap-site, edit composer.json file to point to the correct tag (e.g. dev-master#d55e759) and run /usr/local/bin/composer up browscap/browscap to update the version. This will update the composer.lock with the appropriate version. When you do this, you should see something like this:

$ /usr/local/bin/composer up browscap/browscap
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Updating browscap/browscap dev-master (2f8109c => d55e759)
    Checking out d55e759

  - Updating browscap/browscap dev-master (2f8109c => d55e759)
    Checking out d55e759

Writing lock file
Generating autoload files
> BrowscapSite\Tool\ComposerHook::postUpdate
Generating new Browscap build: 6007
  - Creating build folder
  - Log level set to 250
  - Setting up logging
  - Creating writer collection
  - Creating actual build
  - Generating metadata
  - Updating symlink to point to 6007
All done

Note the additional output starting Generating new Browscap build at the end - this is the build being generated and will take some time. Assuming you have the Browscap site set up locally, you should see the new updated version number displayed on your local copy of the Browscap site.

Also note that we highly recommend using PHP 7.0 or above (preferably PHP 7.1), with xdebug disabled to run composer install for performance.

Deploy to

Commit & push this change to master if you have permissions (or create a PR if not). Once the changes are merged into master, you'll need to get the site deployed. The following process should be followed to deploy the site (if you have access to the server):

$ git pull
$ composer install --optimize-autoloader --no-dev

The composer install process will take a very long time as once dependencies are installed, the build itself is generated automatically according to the BUILD_NUMBER file in browscap/browscap.

Once updated, you'll need to restart Apache and Varnish:

$ sudo service apache2 reload
$ sudo service varnish reload

Also you may need to clear the CloudFlare cache.

The Travis-CI cache should also be cleared on