A partial archive of https://discourse-mediawiki.wmflabs.org as of Saturday May 21, 2022.

Batch upgrade extensions tool

RazeSoldier

Hi all,
Have you ever encountered a tool that can batch upgrade extensions?
If not, I plan to develop tool that have this capability.

Tgr

That sounds ambitious (not that that’s necessarily a bad thing :slight_smile:)
There are tools for specific purposes (such as extension registration) but not a generic “upgrade tool”.

RazeSoldier

I think this can help operator who do not intend to use git to manage version but feel a headache when upgrading MW.

Tgr

Oh, you are talking about a script that upgrades the site (replaces the code with a newer version etc)? Sorry, I thought you were talking about something more like Drupal’s module upgrader.

Vagrant’s git-update command does that; I’m not aware of other tools but then I’m not really knowledgeable in that area.

RazeSoldier

I finished this development. This script works well for me, but it still has to be tested by everyone.

RazeSoldier

If this script on the way in the use of the problem or you have any ideas, please leave a message below or go to Github issues.

TheDJ

You’ll probably want to give some attention to the file permissions being applied. Also, remember that if you upgrade extensions, you might have to run the ./maintenance/update.php script. You might want to encourage users to do so.

RazeSoldier

Some extensions need to run the update.php, some extensions do not. mwExtUpgrader is mainly to replace the old file as the new file. Run update.php script this thing should be handed over to the operator to run manually.

But thank you for your opinion, I plan to prompt people to run update.php script after mwExtUpgrader script has been successfully upgraded.

RazeSoldier

Yes, I should check the permissions of the file being applied.

RazeSoldier

When the script can be used for production, can I publicize this script? For example, publicize here.

Nikerabbit

There is https://www.npmjs.com/package/mediawiki-extension that I have tried in the past.

As I am nowadays only using git, it’s easy to write a script that goes over the git clones and updates them, such as:

These don’t run update.php, that’s either done manually or part of a larger script.

RazeSoldier

It’s a good idea to update core and extensions with git. But many people are updated one by one via ExtensionDistributor, like me.

Tgr

Eventually, something like this should be bundled with MediaWiki I suppose? Filed T187128 so there is a place to discuss and collect the existing tools.