Skip to content
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

When incrementing version using commit message, we only consider tags with a valid version #3889

Conversation

HHobeck
Copy link
Contributor

@HHobeck HHobeck commented Jan 29, 2024

Description

Changed method FindCommitMessageIncrement in IncrementStrategyFinder to consider SHA from tags that have semantic versioning, by reusing GetTaggedSemanticVersions of IRepositoryStore.

The change requires removing the tagsShaCache since the discovery must account for the currently used configuration and its prefix.

Close #3757

Related Issue

See issue #3757

Motivation and Context

The current behavior won't allow any other tagging (by the CI or users) to co-exist with version bumping commits.

The problem appears when any of the commits attempting to bump the version come before a tag that is not version related.

The current implementation will ignore those commits, assuming it will find a version forcing tag, when in reality there's no version defined in it.

How Has This Been Tested?

Added a new theory in VersionBumpingScenarios.cs with 5 test cases covering prefixed versions too.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@HHobeck HHobeck force-pushed the feature/Version-not-bumped-if-an-irrelevant-tag-exists branch from 5bf9598 to a4a2195 Compare February 5, 2024 08:07
@HHobeck
Copy link
Contributor Author

HHobeck commented Feb 5, 2024

Hi @arturcic.

If you have time please review and merge this PR.

Thank you!

@arturcic
Copy link
Member

arturcic commented Feb 5, 2024

sure, I might have some time this week.

@arturcic arturcic self-requested a review February 5, 2024 08:14
@HHobeck HHobeck force-pushed the feature/Version-not-bumped-if-an-irrelevant-tag-exists branch from a4a2195 to 158bac4 Compare February 6, 2024 06:59
@arturcic arturcic merged commit 5a1a920 into GitTools:main Feb 6, 2024
134 checks passed
Copy link
Contributor

mergify bot commented Feb 6, 2024

Thank you @HHobeck for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Version not bumped if an irrelevant tag exists in latest commit
2 participants