ccatobs/MODBUS

Misleading version in version.py

Closed this issue · 5 comments

The version as given in version.py is the commit number of the previous commit. This is highly misleading. version.py should either contain the commit number of the current commit or a completely different version number. Alternatively, the file should be removed.

as decided last SW conference this year we agreed on the following pre-commit in hooks:

ralf:~/pycharm-projects/ccatp/MODBUS/.git/hooks$ cat pre-commit
#!/bin/sh

GIT_VERSION=$(git describe --always)

if [ -n "$GIT_VERSION" ]; then
echo "version = '$GIT_VERSION'" > ./version.py
git add ./version.py
fi

See here: https://wiki.astro.uni-koeln.de/wikis/!ccatprime/doku.php?id=software:manuals:programmers_manual

This does not seem to work correctly, s. screenshot from https://github.com/ccatp/MODBUS/blob/qa/version.py
Bildschirmfoto 2023-08-11 um 14 33 14

sorry I only adopted the code in the programmer's manual. Who put it there, anyways?

Then we should revise the manual and I get rid of the pre-commit hook

Next commit it's gonna be gone

Suppose the issue is solved