-
Notifications
You must be signed in to change notification settings - Fork 2
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
Use Behat to test different scenarios with semantic versioning #40
Conversation
*/ | ||
private function selectVersionType(string $type): void | ||
{ | ||
if ($type === 'major') { |
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 am always more fond of a switch-statement with these kinds of if-elseif-elseif-elseif-else-statements. Just taste-wise.
features/semantic-versioning.feature
Outdated
Feature: Calculating a version number based on semantic versioning | ||
|
||
Scenario: Releasing a major version | ||
Given a release on this branch with version "1.0.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 had to read this line a few times to understand
Given the latest release on this branch is x.x.x
Given the latest tag on this branch is x.x.x
features/semantic-versioning.feature
Outdated
Scenario: Releasing a patch version | ||
Given a release on this branch with version "1.0.9" | ||
When I release a new patch version | ||
Then version "1.0.10" should be released |
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.
Not all cases (that seem common sense from a developers perspective) are present.
Does a major release from 1.0.1 really go to 2.0.0? Etc.
We might need some tests for the following cases.
- 1.0.1 > major > 2.0.0
- 1.1.0 > major > 2.0.0
- 1.1.1 > minor > 1.2.0
- 1.1.1 > patch > 1.1.2
And what happens when I release a patch or minor on 2.0.0-beta.2?
No description provided.