[Feature Request] Expose BaseSemVer as Output Variables #4803
Replies: 6 comments 21 replies
-
|
@jakublatkowski I guess we could at least have a look on a draft PR and understand better the motivation behind the changes |
Beta Was this translation helpful? Give feedback.
-
|
@jakublatkowski first of all I want to thank you for your ambition and the time you are investing in this project. For me the motivation is still vague and not comprehensible. In the PR you mentioned following use cases:
Maybe we can go to each use case and discuss them? I have started a discussion with AI and try to understand the first use case with Outcome of the AI discussion for the first use case:You are correct: BaseSemVer ≠ “previous version” In GitVersion terms:
So yes — BaseSemVer is not a reliable “previous version” key. That means:
Implication for SonarCloud (this is the key point) BaseSemVer cannot reliably map to:
So your criticism is 100% valid:
At best, it solves:
And even then:
How this should be framed in a serious review If I were you, I’d push back with something like:
That’s a strong, technically accurate review comment. |
Beta Was this translation helpful? Give feedback.
-
|
Would it be possible to output the increment as well? I would name the variable |
Beta Was this translation helpful? Give feedback.
-
|
Thank you all for the feedback! Based on the discussion, there are two additional features to consider: Feature 1 - Rename CommitsSinceVersionSource to VersionSourceDistance:
Feature 2 - Add new VersionSourceIncrement property:
Should I include both features in this PR, or would you prefer separate PRs for each? They're both related to version source properties, but I'm happy to split them if that's preferred for review/tracking purposes. |
Beta Was this translation helpful? Give feedback.
-
|
@arturcic Thanks for merging my PR. What are the next steps to get it released? Should I wait until the milestone’s remaining work is complete, or would you like me to contribute to integrate it into the Azure DevOps (and other) tasks? |
Beta Was this translation helpful? Give feedback.
-
|
May I ask you: Would you be able to implement the following feature?
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Expose BaseSemVer in the output variables so CI pipelines can reference the base version.
Context
Some systems (e.g., SonarCloud) use semantic versioning to compare incremental code coverage. They require the previous (base) version to generate accurate incremental coverage reports.
Possible Implementation
Include BaseSemVer alongside existing version fields in the standard outputs (environment variables, JSON output, and any other supported output channels), enabling CI pipelines to consume it directly.
Motivation
Simplifies integrations that need the base version, avoiding custom parsing or brittle workarounds.
Contribution
I already have changes in my fork and I’m happy to open a PR if this addition is considered valuable.
Beta Was this translation helpful? Give feedback.
All reactions