mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-23 10:19:35 +00:00
updateSubmodule.sh: Use gerrit remote if it exists
Change-Id: I82f23ce8721c16d57f5c918d4ceda634c73bc959
This commit is contained in:
parent
2a343cd598
commit
4870a285f2
|
@ -21,12 +21,18 @@ then
|
|||
fi
|
||||
cd ../..
|
||||
|
||||
git fetch origin
|
||||
# Use 'gerrit' if it exists, otherwise 'origin'
|
||||
MW_REMOTE=$(git remote | grep -w gerrit || echo origin)
|
||||
|
||||
git fetch $MW_REMOTE
|
||||
# Create sync-repos branch if needed and reset it to master
|
||||
git checkout -B sync-repos origin/master
|
||||
git checkout -B sync-repos $MW_REMOTE/master
|
||||
git submodule update
|
||||
cd lib/ve
|
||||
git fetch origin
|
||||
|
||||
CORE_REMOTE=$(git remote | grep -w gerrit || echo origin)
|
||||
|
||||
git fetch $CORE_REMOTE
|
||||
|
||||
# Figure out what to set the submodule to
|
||||
if [ -n "${1:-}" ]
|
||||
|
@ -34,8 +40,8 @@ then
|
|||
TARGET="$1"
|
||||
TARGETDESC="$1"
|
||||
else
|
||||
TARGET=origin/master
|
||||
TARGETDESC="master ($(git rev-parse --short origin/master))"
|
||||
TARGET=$CORE_REMOTE/master
|
||||
TARGETDESC="master ($(git rev-parse --short $CORE_REMOTE/master))"
|
||||
fi
|
||||
|
||||
# Generate commit summary
|
||||
|
|
Loading…
Reference in a new issue