Skip to content

Instantly share code, notes, and snippets.

@reedy
Created September 24, 2014 15:32
Show Gist options
  • Save reedy/fa7beee119e7b55f004d to your computer and use it in GitHub Desktop.
Save reedy/fa7beee119e7b55f004d to your computer and use it in GitHub Desktop.
Script to update mediawiki submodule to the head of its deployment branch
#!/bin/bash
if [ $# -ne 2 ]
then
echo "Usage: `basename $0` <branch> <extension>"
echo "e.g. `basename $0` 1.21wmf6 CodeReview"
exit
fi
PWD="`pwd`"
cd /home/reedy/git/mediawiki/core
git fetch --all
git checkout wmf/$1
git pull
git pull gerrit
cd extensions/$2
git fetch --all
git checkout wmf/$1
git pull
cd ../..
git commit extensions/$2 -m "Update $2 to $1 HEAD"
git review
git reset HEAD~1 --hard
git submodule update --init --recursive extensions/$2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment