Update Versioning authored by Klaas Kliffen's avatar Klaas Kliffen
...@@ -18,12 +18,12 @@ Additional labels for pre-release and build metadata are available as extensions ...@@ -18,12 +18,12 @@ Additional labels for pre-release and build metadata are available as extensions
### Python Package ### Python Package
In python we use [setuptool_scm](https://github.com/pypa/setuptools_scm/). In python we use [setuptool_scm](https://github.com/pypa/setuptools_scm/).
It requires a git repository to function (can be empty!). It requires a git repository to function (can be empty!).
Use a git tag `1.2.3` to set a version. For development build, it will add a unique identifier based on both the commit hash and the "distance" to the latest tag. Use a git tag (e.g. `1.2.3`; following semver) to set a version. For development builds, it will add a unique identifier based on both the commit hash and the "distance" to the latest tag.
**IMPORTANT**, for correct version handling, make sure to tag your versions regularly. Our gitlab runners only check-out the last 50 commits (excluding merge commits). So if the distance is more than 50, your development versions will be inconsistent! **IMPORTANT**, for correct version handling, make sure to tag your versions regularly. Our gitlab runners only check-out the last 50 commits (excluding merge commits). So if the distance is more than 50, your development versions will be inconsistent!
Check out the following package for a concrete example in use: Check out the following package for a concrete example in use:
[ASTRONauth](https://git.astron.nl/astron-sdc/astronauth): [ASTRONauth](https://git.astron.nl/astron-sdc/astronauth); mainly focusing on `pyproject.toml` and the `__init__.py` in the main package directory.
```toml ```toml
# pyproject.toml # pyproject.toml
... ...
......