verri.tasty
¶
A collection of tasty version flavours.
verri.tasty.strawberry()
¶
A version flavour that uses the commit date of HEAD and the number of
first parent commits since midnight on the commit date to construct a version
formatted as yyyy.mm.dd.n, where n is the number of other first parent commits than HEAD on the same date.
Fallback
This flavour will fall back to mango flavour on error, see
error handling.
Source code in verri/tasty.py
verri.tasty.pineapple()
¶
A version flavour that uses the commit date of HEAD and a number of components to construct a version:
- the number of first parent commits since midnight on the commit date;
- whether the version is being determined on a CI/CD environment;
- whether the git checkout is clean;
- the current git branch is the default branch.
The resulting version is considered a "release" version if the checks above are all true. A pineapple flavoured
release version is much like a strawberry flavour, although a trailing .0 will be
omitted.
If not, a development version number will be created.
Fallback
This flavour will fall back to mango flavour on error, see
error handling.
Source code in verri/tasty.py
verri.tasty.mango()
¶
A version flavour that represents the current date (see dates.midnight), formatted as
yyyy.mm.dd, without leading zeroes.
Warning
This flavour takes nothing but the current date into account, potentially creating the same version number for multiple releases made on the same day.
Source code in verri/tasty.py
verri.tasty.cherry()
¶
A version flavour much like [mango], formatted as yyyy.mm.dd.sss, where sss is the number of seconds in the day
since midnight.
Warning
Depending on your build system, and the speed at which your project gets built, constructing different versions during the same build process can cause issues. Use with caution.