Hashar has uploaded a new change for review.
https://gerrit.wikimedia.org/r/115169
Change subject: fetch-mw-ext: fallback to git.wikimedia.org zip
......................................................................
fetch-mw-ext: fallback to git.wikimedia.org zip
When adding extension dependencies on a labs instance we do not have
access to /srv/ssd/gerrit, so fallback to git.wikimedia.org tarballs.
Change-Id: Ib6a7f0c4322fb30395fd0d8dee7e732657fd836e
---
M tools/fetch-mw-ext
1 file changed, 11 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins
refs/changes/69/115169/1
diff --git a/tools/fetch-mw-ext b/tools/fetch-mw-ext
index 8486249..ee52f10 100755
--- a/tools/fetch-mw-ext
+++ b/tools/fetch-mw-ext
@@ -28,11 +28,17 @@
# Recreate the directory for 'git archive'
mkdir -p "$DEST"
- echo "Copying '$1' in '$DEST'"
- echo "Git archive of 'master' from $GIT_BARE_DIR"
- git archive --remote="$GIT_BARE_DIR" master \
- | (cd "$DEST" && tar xf -)
- echo "Copy complete."
+ if [ -d "$GIT_BARE_DIR" ]; then
+ echo "Copying '$1' in '$DEST'"
+ echo "Git archive of 'master' from $GIT_BARE_DIR"
+ git archive --remote="$GIT_BARE_DIR" master \
+ | (cd "$DEST" && tar xf -)
+ echo "Copy complete."
+ else
+ echo "Getting tarball of '$1' from git.wikimedia.org to '$DEST'"
+ curl
"https://git.wikimedia.org/zip/?r=mediawiki/extensions/${1}.git&format=gz&h=master"
\
+ | (cd "$DEST" && tar xzf -)
+ fi
}
# Pre checks
--
To view, visit https://gerrit.wikimedia.org/r/115169
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib6a7f0c4322fb30395fd0d8dee7e732657fd836e
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Hashar <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits