-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Leverage Nerdbank.GitVersioning to auto-increment version numbers #1212
base: master
Are you sure you want to change the base?
Conversation
Didn't get to it this weekend, will ping back later. |
I think if ADO was not doing a shallow checkout, this should work as-is. |
Change `branchName` from `v{version}` to `releases/v{version}` to match existing branches. Change `tagName` from `v{version}` to `UnitsNet/{version}` to match existing tags.
Matches docs, since the patch will be determined by CI
@angularsen are you able to edit the ADO build to do a full depth checkout? (Depth 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed some changes to match existing branch names and tag names.
Also some questions/thoughts below.
- How do we test this without pushing nugets? Should we create a new master branch to simulate how master would be and disable push to nuget.org on that branch?
- What is the procedure for bumping versions? It seems GitVersioning and their CLI tooling is aimed towards stabilizing releases on new branches, but in UnitsNet it is pretty much about bumping minor versions for every new unit and additive changes. I want to keep it simple, ideally having the CI build bump the minor version for me. Not sure if it can be configured that way, it seems patch version is what is supported for auto-versioning.
@@ -20,7 +20,6 @@ | |||
|
|||
<!-- Assembly and msbuild properties --> | |||
<PropertyGroup> | |||
<AssemblyVersion>5.0.0.0</AssemblyVersion> <!-- Should reflect major part of Version --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making a mental note to verify that the assembly version is still 5.0.0.0 and not 5.5.0. If I recall correctly, this is important for those that rely on strong name signed assemblies to not have problems when upgrading.
@@ -5,9 +5,6 @@ if %errorlevel% neq 0 goto EXIT | |||
call git pull --rebase --prune | |||
if %errorlevel% neq 0 goto EXIT | |||
|
|||
call build\bump-version-UnitsNet-minor.bat | |||
if %errorlevel% neq 0 goto EXIT | |||
|
|||
call git push --follow-tags --set-upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the CI build would instead do the tagging now? Also, this whole file can probably be deleted.
https://github.com/dotnet/Nerdbank.GitVersioning/blob/main/doc/nbgv-cli.md#creating-a-version-tag
version.json
Outdated
"enabled": true | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how to best handle UnitsNet vs JSON nugets. We currently bump the versions separately and tag them separately.
On one hand, it is useful to only bump JSON when it actually has any changes.
On the other hand, I want a simple setup that avoids mistakes like we had recently.
If they share version number, then I guess they can also share git tag.
I lean towards a single version for all UnitsNet packages - UnitsNet, Json and NanoFramework packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can create nested version.json files if we want to split it still, and set a nbgv path filter
Hmmm indeed. Let me see if I can make it get the minor to increment |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Leverage Nerdbank.GitVersioning to auto-increment version numbers
I need your help @angularsen with the NanoFramework items. Not sure if I did it right.
Also I suppose we may need to remove some files (build\bump-version-UnitsNet-minor.bat, etc.)?