openmicroscopy/ome-documentation — pull request #366 by sbesson (2013-05-16 16:41:16+00:00)
Title: Fix OMERO version number generation

Changes
- Fix a bug in the server upgrade page where the previous version number was
calculated to 5.-1
- Correctly parse the version numbers using semver.org conventions
- Define list of previous minor versions for each major version
- Do not import the re module globally

Testing instructions:
- Check the build is green and the server upgrade page is correctly updated
- Locally, test the OMERO documentation build with multiple release numbers, e.g.

```
cd omero
OMERO_RELEASE=5.0.0 make html
OMERO_RELEASE=5.0.0-alpha3 make html
OMERO_RELEASE=5.0.1 make html
OMERO_RELEASE=5.1.0 make html
OMERO_RELEASE=5.1.5 make html
OMERO_RELEASE=5.100.0 make html
make html
```

After each build, look at the `_build/html/sysadmins/server-upgrade.html` page especially the `_build/html/sysadmins/server-upgrade.html#upgrade-your-database` section and check everything behaves as expected
- Check the following build command

```
cd omero
OMERO_RELEASE=6.0.0 make html
```

fails with an informative error message. NB: for each new major series as 5.0.x, the previous minor version number is read from a hard-coded function. If anyone has a better suggestion, I am happy to hear about it (I deliberately didn't introduce an extra environment variable)