Skip to content

Conversation

ap0llo
Copy link
Contributor

@ap0llo ap0llo commented May 1, 2021

When the next version for the current branch is set by the user using the --nextVersion command line parameter, the next version might be equal to the current version.
In that case no commit is created (no changes on the branch), which in turn causes the current branch to be fast-forwarded to the commit on the newly-created release branch when the branches are merged.

To prevent this error, abort command if both versions match (there is already a check in place that prevents the version from being decremented).

The check only applies to the current branch because the version on the release branch not being incremented is a valid use case.

This should fix #591

…ncremented

Ensure version on current branch is updated by prepare-release command

When the next version for the current branch is set by the user using
the '--nextVersion' command line parameter, the next version might be
equal to the current version.
In that case no commit is created (no changes on the branch), which in
turn causes the current branch to be fast-forwarded to the commit on
the newly-created release branch when the branches are merged.

To prevent this error, abort command if both versions match (there is
already a check in place that prevents the version from being decremented).

The check only applies to the current branch because the version on the
release branch not being incremented is a valid use case.
Copy link
Collaborator

@AArnott AArnott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thanks for the added tests as well.

@AArnott AArnott added this to the v3.5 milestone May 1, 2021
@AArnott AArnott merged commit 25f1c53 into dotnet:master May 1, 2021
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.

Weird behaviour when nextVersion is equal current version
2 participants