4 ms·
I much prefer Nerdbank Git Versioning (NBGV): https://github.com/dotnet/Nerdbank.GitVersioning https://github.com/dotnet/Nerdbank.GitVersioning It allows repea
by jiggawatts 2y ago
I much prefer Nerdbank Git Versioning (NBGV): https://github.com/dotnet/Nerdbank.GitVersioning https://github.com/dotnet/Nerdbank.GitVersioning
It allows repeatable builds because it uses the "git height" as the increment source.
This is an implicitly updated value that is centrally coordinated, but isn't a separate system. If you have Git, you have a Git commit history, and hence an incrementing counter.
NBGV can stamp binary outputs such as .NET EXEs and DLLs, generates compile-time sources with version strings, works with Node.js projects as well, and integrates with Azure DevOps pipelines automatically.
- fuzzzerd 2y agoI have been using MinVer for dotnet projects, which is similar but a little easier (IMO) to work with since its all based on tags.
- globular-toast 2y agoWhat if you rebase/force push? Seems dangerous to rely on "protected branches" and the like to avoid version clashes.
- jiggawatts 2y agoOn master/main? What are you, a savage? That's the only version that should really matter. Release branches, if used, tend to be pretty stable in terms of git shenanigans. The versions of dev branches don't really matter, and if it's a huge concern, you can simply bump the version in the NGBV config file to ensure that versions increase the way you want them to.
- globular-toast 2y agoNot intentionally! But actually I think the concern is unwarranted because looking again it seems they don't include the hash for release versions, so if someone did force push master/main the artifact repository should reject it.