-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add 'update' command #111
Comments
I just installed bee, and the first thing I noticed is this functionality missing. We definitely need this! |
+1 It would be nice to allow to specify one or more items to update, or just to use a global update command to update all that have new releases. I think on Drupal you could do (for example) |
+1 As a starter for ten here is draft help based on @laryn 's comment above. This could form requirements:
If I wanted to have a go at doing this (no promises as not sure that I can), is there a good place to start? |
@yorkshire-pudding The new command would go into https://github.com/backdrop-contrib/bee/blob/1.x-1.x/commands/update.bee.inc See https://github.com/backdrop-contrib/bee/blob/1.x-1.x/API.md for an explanation of the various options when creating commands. |
Thanks @BWPanda - that is really useful. Is this the right bit of core api ? https://docs.backdropcms.org/api/backdrop/core%21modules%21system%21system.updater.inc/1 |
/*
* @todo consider if any drush extension code can be re-used https://github.com/backdrop-contrib/backdrop-drush-extension/blob/1.x-1.x/commands/pm/backdrop_pm.drush.inc
* @todo consider if brush can be re-used https://github.com/backdrop-contrib/brush/blob/1.x-1.x/commands/pm/updatecode.pm.inc
* @todo check if file permissions allow backdrop to update itself?
* @todo determine required files:
* - core/modules/update/update.fetch.inc
* - core/modules/system/system.updater.inc ?? (https://docs.backdropcms.org/api/backdrop/core%21modules%21system%21system.updater.inc/1)
* - core/includes/update.inc
* - core/modules/installer/installer.manager.inc (https://docs.backdropcms.org/api/backdrop/core%21modules%21installer%21installer.manager.inc/1)
* - core/modules/installer/installer.manager.inc (https://docs.backdropcms.org/api/backdrop/core%21modules%21installer%21installer.manager.inc/function/installer_manager_update_ready_form/1)
* @todo process arguments (list of projects)
* @todo process option (security-updates-only)
* @todo check for config item - update_disabled_extensions (Configuration>Update settings>) - if this is true (1) then need to check disabled projects also
* @todo get list of installed projects (core, modules, themes, layouts) if no argument list of projects
* @todo list of projects is either all installed + core, all enabled + core or argument list of projects
* @todo get current backdrop version
* @todo for each project in list get current version, type, name
* @todo for each project in list get available version
* @todo compare versions and prepare list of possible updates
* @todo ??option to review and proceed or cancel??
* @todo download updates to temp directory
* @todo install updates
* @todo can we / should we check if database updates needed and let user know
*/ |
This is a really useful addition in my humble opinion. Drush does not work in PHP 8, so I need to move on.
The $argv variable is null |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@yorkshire-pudding, much to my surprise, I have got a very basic update working to update the modules and themes, not backdrop itself (already taken care of in the commands). |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
@TheMetMan Can you please point me to the command that you use to update backdrop itself? I tried using Thank you for creating bee! |
@marioawad - this is not ready yet as a
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Hi @TheMetMan - I have created a new branch as I think this may require a bit of work before merging to 1.x-1.x . Please rebase (Sync) your repo to the latest |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
What is the status of this, please? This is the number 1 thing that I used drush / brush for until they stopped working ... |
Hi @leeksoup - there is something there that works reasonably well on single site installations (i.e. not multi-site) and @TheMetMan, who started work on this feature is using regularly. It is on this branch. Depending how you have bee installed it may simply be a case of doing There is a warning at the top to not use on production, so if you use it and it breaks your site, then it is at your own risk; the risk is that running an update deletes a module folder and then the download from GitHub fails for some reason and you are left without a critical module until you can repair it. Please also note, that it does not yet update core. After a while with very little love, it is now getting some attention again and one bug and one enhancement have been merged into the feature branch thanks to @hosef. Alas, the need to earn a living does limit the time I can spend on it, so it is not progressing as fast as we would like. It is good to know there is interest though and it does help to motivate developers. |
@yorkshire-pudding - thank you for the detailed response. I was in a hurry so I ended up semi-manually updating by* removing the directories for core and the modules that needed to be updated, and then downloading with bee, restoring / merging settings.php and htaccess, and then updating the DB, also with bee. Next time, I will try this feature branch. I completely understand about not using on a production site. My workflow is generally update on dev site -> test -> deploy to production. Oh, for sure there is interest in this feature! I'm sure I'm not the only one. It would probably help point users to his helpful package if "how to install using bee" (and when it is possible, "how to update using bee") were added to the Backdrop Documentation. ETA: * first making backups, and then ... |
So I'm looking to update again and wondering if the status has changed or if @yorkshire-pudding's last comment is still the way to go. |
@leeksoup - I'm afraid the advice remains the same. I have a clearer idea of what is needed, but, alas, the need to earn a living is preventing me spending the time I would like on this feature |
Understood, @yorkshire-pudding! Turns out I only have Backdrop itself to update this time ... ah well. |
Thanks so much @yorkshire-pudding and @TheMetMan for all your work on this ! I and ,I am sure others really appreciate it. Again, thanks for all your hard work in making this all happen. Manu |
Hi @manu-mei-singh . Thank you for your interest and the offer of help; Palante have been good friends of Backdrop over the years. I do have a plan to add support for core updates. This is in #296 . If any of your team is interested in getting involved, I would be happy to discuss as it wouldn't be good to duplicate any effort. |
hi @yorkshire-pudding , I can devote some time to getting involved later this month or in early march. Let me know how you would like to proceed. thanks! |
Hi @manu-mei-singh - please have a look and see if there are any of the tickets that you would be confident in tackling. I can't tell from your GitHub profile how much PHP work you've done so don't know what your ability level is. |
@yorkshire-pudding , I am in the process of looking around at the tickets. unfortunately It will be slower going than I had planned... |
@yorkshire-pudding - I just tried the |
@yorkshire-pudding first time I've taken a look at this. My initial thought is that putting a project update command in |
@herbdool - thanks for your thoughts.
My former co-maintainer and I disagree. The file, according to the file doc, is actually about: /**
* @file
* Command(s) for updating Backdrop projects.
*/
This will use an enhanced version of download - see #348 - but it doesn't need to be in the same file, and from my point of view it is more logical in update, as well as preferable in keeping download focussed in scope. Update hooks are typically associated with updating the code so they do, in my opinion, and from the user interface process, belong together. |
I just realised that we don't have an
update
command for updating a module/theme/layout to a new version. We should add one.Work is in progress on the issue-111-update-command branch. Huge thanks to @TheMetMan for getting this feature started.
The current branch should work ok for a single site, or a multisite that only uses site specific module/theme/layout folders. It will download all updates.
The text was updated successfully, but these errors were encountered: