Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Gitversion issues with incrementing version

$
0
0

I have a circleci pipeline that process a net core project and generate a nuget package.I followed the steps in this great tutorial https://renatogolia.com/2022/12/23/publish-nuget-package-with-circleci/ and I was able to build and push the package.

I'm having trouble with gitversion, so far I'm able to only increment the patch version. I'm using X.Y.Z for major|minor|patch.

Here's my Gitversion.yml

mode: Mainlinebranches:  main:    is-mainline: true  develop:    tag: ""    increment: Minor    prevent-increment-of-merged-branch-version: false    regex: ^dev(elop)?(ment)?$    is-release-branch: false    is-mainline: false  bugfix:    tag: bugfix    increment: Patch    regex: ^bugfix(es)?    prevent-increment-of-merged-branch-version: false    source-branches:      - develop      - mainignore:  sha: []merge-message-formats: {}

The idea is the following: Allow devs to create branches from develop (I need to update the regex to allow that), then create a PR and merge that changes to main. Once it's merged the circle ci pipeline triggers and generate the nuget package. The problem is that it is only incrementing the PATCH number, not the Minor.

I'm using the semver variable as shown in the circleci tutorial.

  VERSION=$(dotnet gitversion | jq -r ".SemVer")  dotnet pack --configuration Release -p:Version=$VERSION -o ./outputs/packages/

This also applies to those branches from bugfix. Those are incremented by patch number.Any ideas?


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>