pkiraly / qa-catalogue-web

QA Catalogue / A data quality dashboard for MARC catalogues
GNU General Public License v3.0
10 stars 6 forks source link

Introduce versioning of the sofware #155

Open nichtich opened 10 months ago

nichtich commented 10 months ago

As discussed at https://github.com/pkiraly/qa-catalogue-web/issues/142#issuecomment-1820360386 every change to the main branch should result in a new version number (git tag). Questions to decide on:

  1. how to name tags vX.y.Z or X.Y.Z
  2. whether to also support pre-releases (I don't like them, this makes things more complicated)
  3. how to display the version number on the UI (it's only available as git tag)

For 3, a script like this would help:

TAG=$(git tag --points-at HEAD | head -1)
BRANCH=$(git rev-parse --abbrev-ref HEAD)
CLEAN=$(git diff --quiet && echo ok)
COMMIT=$(git rev-parse HEAD)

This information could be written into a local file and read to be displayed in the UI.

pkiraly commented 10 months ago
  1. So far we added 'v' to version number, so the pattern I would prefer is vX.Y.Z.
  2. in the backend the release process is a bit complicated, and I test the steps with preleases. For the UI it is not so important.
  3. I attach a screenshot from Dataverse. It is displayed at the bottom of the page. Screenshot from 2023-11-21 16-52-33. There is a mechanism in Maven to export these info during the building process.
nichtich commented 10 months ago

The develop branch now contains functionality to show version number (current git tag) or branch and commit in the footer, please try out for testing. If the application is served as www-data or from Docker, the direct access to git will likely not work (see install note in README.md). In this case the data is read from local file version.ini, created by composer version (automatically called after composer install and as part of composer release). For releasing, the version number has to be set manually with git tag.

This should craft a new release from current develop branch, with version number:

git tag v0.7.1; composer release

Without tagging, the branch and commit hash is shown instead.