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

Refactor next version calculator (get rid of taggedSemanticVersion) #3244

Merged
merged 11 commits into from
Feb 19, 2023

Commits on Feb 19, 2023

  1. Fix CanTakePreReleaseVersionFromReleasesBranchWithNumericPreReleaseTa…

    …g test
    
    Because release branch has 'beta' prefix configured.
    AlexPykavy committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    c31abe3 View commit details
    Browse the repository at this point in the history
  2. Rearrange actions in the UpdatePreReleaseTag method

    To improve readability.
    AlexPykavy committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    e151052 View commit details
    Browse the repository at this point in the history
  3. Rename UpdatePreReleaseTag variables

    To make the method logic more understandable.
    AlexPykavy committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    67e6722 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    26d9ac3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3442d5a View commit details
    Browse the repository at this point in the history
  6. Calculate semver BuildMetaData if versioning mode is not mainline

    Because `this.mainlineVersionCalculator.FindMainlineModeVersion(nextVersion.BaseVersion)` method
    calculates BuildMetaData on its own.
    AlexPykavy committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    4828d78 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    15efee0 View commit details
    Browse the repository at this point in the history
  8. Get rid of taggedSemanticVersion approach

    Change next version calculator to act according to the next algorithm:
    1. Calculate next version candidate based on the base one
    2. Look for the latest `PreReleaseTag` matching Major, Minor and Patch
    of the next version candidate.
    3. Append the `PreReleaseTag`, if found, to the next version candidate.
    4. Compare the next version candidate with `Context.CurrentCommitTaggedVersion`
    including the `PreReleaseTag` comparison.
    5. Increment the `PreReleaseTag` of the next version candidate if versions mismatch.
    6. Return the next version candidate.
    AlexPykavy committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    fb0be83 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    471d1e0 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e1bd3a9 View commit details
    Browse the repository at this point in the history
  11. Change SemanticVersion's PreReleaseTag and BuildMetaData to a non-nul…

    …lable type
    
    Because they are always set in SemanticVersion's constructor.
    They can be null only if explicitly set by the client of the class and
    there are plans to forbid this functionality.
    AlexPykavy committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    5767382 View commit details
    Browse the repository at this point in the history