-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Implement upgrade_only_if_version_changes
in manifest
#864
Conversation
upgrade_only_if_version_changes
manifest
upgrade_only_if_version_changes
manifestupgrade_only_if_version_changes
in manifest
And globally, add fucking comments !!! |
Co-Authored-By: Maniack Crudelis <maniackcrudelis@users.noreply.github.com>
Co-Authored-By: Alexandre Aubin <alex.aubin@mailoo.org>
Co-Authored-By: Alexandre Aubin <alex.aubin@mailoo.org>
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.
Apart from remaining small comments to improve code, that looks good to me ! Thanks for bearing with the question / suggestions 😅
Co-Authored-By: Alexandre Aubin <alex.aubin@mailoo.org>
Co-Authored-By: Alexandre Aubin <alex.aubin@mailoo.org>
Co-Authored-By: Alexandre Aubin <alex.aubin@mailoo.org>
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.
LGTM
Fixes #33 ? Edit: link because markdown on mobile is flawed: |
c.f. a quick discussion on the chat : I'm proposing to enable this behavior by default, without adding/enabling the option in every manifest app (which is going to be a pain in the ass because we have 140+ apps and hmpf) To be discussed during tomorrow's meeting |
-F: | ||
full: --force | ||
help: Force the update, even though the app is up to date | ||
action: store_true |
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 suggest a break change:
-f is used in install operation as in other part of the cli. I suggest to define -F for --file and -f for --force.
This change concerns packagers, and i prefer a break change for packager, than an inconsistency for final users
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.
N.B. : it's used here : https://github.com/YunoHost/package_check/blob/master/sub_scripts/testing_process.sh#L965 so gotta be careful
I'm okay with the change but maybe we can do this in a separate PR to move forward ...
The problem
Solution
Implement in the core this concept
Add helper
ynh_compare_package_version
.PR Status
Work done
How to test
"upgrade_only_if_version_changes":true
in the manifestYNH_APP_UPGRADE_TYPE
which will give you the type of upgrade. It could be:UPGRADE_FORCED
when there are nothing to update but the user forced the updateUNKNOWN
for the app which don't use the correct syntax for the app version management.UPGRADE_FULL
when the upstream and the package need an update.UPGRADE_APP
when the upstream need to be updated.UPGRADE_PACKAGE
when the package need to be updated.-F
.ynh_compare_package_version
in the upgrade of an app.Validation