Tech:Updating an extension

This is a guide for updating any extension that we already have installed. While sysadmins can directly update extensions, users can make pull requests to update extensions by forking our mediawiki repository.

To update an extension:

git clone https://github.com/miraheze/mediawiki.git
 * On your PC

git submodule init [extension path]

git submodule update [extension path]

cd [extension path]

git pull origin [branch]

cd ..

git add.

git commit -m "Updating [extension]"

git push

Only if puppet fails: cd /srv/mediawiki/w/extensions && sudo -u www-data git reset --hard origin/REL1_35 && sudo -u www-data git pull ; sudo -u www-data git submodule update
 * On the server

sudo puppet agent -tv

sudo -u www-data php /srv/mediawiki/w/maintenance/mergeMessageFileList.php --output /srv/mediawiki/config/ExtensionMessageFiles.php --wiki loginwiki
 * Normally (even if above):

sudo -u www-data php /srv/mediawiki/w/maintenance/rebuildLocalisationCache.php --wiki loginwiki

sudo -u www-data php /srv/mediawiki/w/extensions/MirahezeMagic/maintenance/rebuildVersionCache.php --save-gitinfo --wiki=loginwiki

N.B.: Generally, you do not need to update an extension manually as Dependabot automatically creates pull requests each week. However, if you are certain that you need to update an extension and it should not be delayed for whatever reason (e.g. important bug fix that affects one or more wikis, or a security update), you should follow the instructions above instead of waiting for Dependabot.