-
Notifications
You must be signed in to change notification settings - Fork 10
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
Automatically add next versions #40
Conversation
@matks @jolelievre Added tests to test getting version numbers. Added tests to test getting next major, minor and patch versions. Moved the PR into upstream. Can you tell me how can I now test the deployment? https://preprod-api.prestashop-project.org/modules/8.2.0 still doesn't contain nothing. 🤷♂️ |
Test and deploymentRead https://github.com/PrestaShop/distribution-api?tab=readme-ov-file#workflow
Your code should now be available on integration-api.prestashop-project.org Looking at integration for your PROn https://integration-api.prestashop-project.org/ I can see that
About logic
I think you went too far 😁 I don't think we need 9.1.0 right now you're 1 year early. |
@matks The logic has been fixed, I forgot comparator sign. Available endpoints: |
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.
@Hlavtox Your tests do not cover the generation logic. Your tests do not verify that, if the "highest found version" is 8.1.4, then development versions 8.1.5, 8.2.0 et 9.0.0 will be added. This is what I insist on having covered.
Your tests simply verify the model PrestaShop
logic which is basically "how to use implode" ^^
We want to put tests in place not only to catch bugs now but also to catch bugs in the future, when the next developer comes and modifies this logic, and breaks something.
Do you need help to run the tests?
@matks Mathieu could you write the tests please? I don't want to spend more time with it. 🙏 |
40decd0
to
0a1b146
Compare
d21218f
to
36d7818
Compare
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.
Looks good to me
if ($prestashopVersion->getVersion() === $nextPatchVersion) { | ||
$addPatchVersion = false; | ||
// Let's initialize utilities to get us the highest versions | ||
$versionUtils = new VersionUtils(); |
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.
Suggestion: we could have injected it into the__construct using DI
Replacement of #39.
Before:
1.7.8.10
8.0.4
8.0.5
8.1.3
8.1.4
9.0.0
After:
1.7.8.10
8.0.4
8.0.5
8.1.3
8.1.4
9.0.0
10.0.0 // Added
9.0.1 // Added
9.1.0 // Added
8.1.5 // Added
8.2.0 // Added