There is a very detailed article that explains the idea of "Semantic Versioning" at https://semver.org/
Especially when you need to deal with "internal versioning" from a nightly-build system, you simply append a "pre-release identifier".
We consider this as "best practise". ;-)
Cheers, Andy