GitVersion help

I'm trying to use gitversion v6 to auto-version nuget packages I'm building in a github action, but I can not get it to work correctly and not having much luck going through the documentation. I don't really understand the different "modes", and most of the posts/videos are using v5. 1. There are no releases or tags in the repo currently. 2. I want to start off at version 1.0.0 3. Branches are main, release, and any other branch (we'll call them feature branches, but not necessarily named feature) not named those two. 4. Use conventional commit messages to control version bumping completely What I want: Any branch not main or release, gitversion should produce a version with the branchname used in the pre-release build. The "feature" branches get merged into release, and the same version but without the branchname should be used. Any merges should always use the highest combined version from the merged in branches. I feel like what I want should be simple to set up so I don't get why it isn't working. If I use the default config, but just change the major/minor/patch bump message regex, nothing bumps. Have tried setting the different modes manually, but sometimes get an error there's no initial version that can be calculated.
2 Replies
viceroypenguin
personal recommendation: MinVer nuget package is better than GitVersion. just tag a commit with a version number and that's the version number that everything else uses, including nuget package version. anything after that until the next tag gets a promotion to the next minor version with a -preview.n on it.
Nacho Man Randy Cabbage
Is this strictly a nuget package? Unfortunately there is a long approval process to use any third party package in an app. I could convince them but we're talking months

Did you find this page helpful?