Created
September 24, 2014 15:32
-
-
Save reedy/fa7beee119e7b55f004d to your computer and use it in GitHub Desktop.
Script to update mediawiki submodule to the head of its deployment branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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