Skip to content
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 metadrop/drupal-updater #129

Open
syzygy333 opened this issue Feb 2, 2024 · 0 comments
Open

Add metadrop/drupal-updater #129

syzygy333 opened this issue Feb 2, 2024 · 0 comments

Comments

@syzygy333
Copy link
Contributor

Drupal Updater is a command-line tool that helps update Drupal core plus modules and their dependencies. Rather than going to the project's /admin/reports/updates and looking for what can be updated and performing those updates one by one, this package can be used to make all updates at once.

Add it to a project by running composer require metadrop/drupal-updater.

Once added, it can be run by calling the script in the terminal: ./vendor/bin/drupal-updater update

To avoid having to remember this command, I suggest also adding this line to the composer.json:

"scripts": {
    "easy-update": [
        "Composer\\Config::disableProcessTimeout",
        "./vendor/bin/drupal-updater"
    ]
},

Once added, you can now call the script in the terminal like so: composer easy-update (you can name it anything you like, it doesn't have to be "easy-update," the point is to make it memorable).

When the script runs, it does a pretty good job of outlining what it is doing.

1. Consolidating configuration
2. Checking packages
3. Updating packages
4. Report

As it states, it will export config to make sure that all changes are captured, then it will run through each drupal/ package in the composer.json, checking whether there is an update available. If there is, it will apply the update using the --with-all-dependencies flag. It will make its own atomic commits and push them once complete. They will look something like this when viewing them on GitHub:

UPDATE - drupal/core-recommended: package (10.2.1 -> 10.2.2), dependencies

+-------------------------+--------+--------+--------------------------------------------------------------------+
| Production Changes      | From   | To     | Compare                                                            |
+-------------------------+--------+--------+--------------------------------------------------------------------+
| drupal/core             | 10.2.1 | 10.2.2 | drupal/[email protected]             |
| drupal/core-recommended | 10.2.1 | 10.2.2 | drupal/[email protected] |
+-------------------------+--------+--------+--------------------------------------------------------------------+

How long the process takes to complete will depend on the number of modules in use, but expect it to take somewhere around 10 minutes.

After completion, perform functional QA on all updated packages as you normally would.

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

No branches or pull requests

1 participant