#!/bin/sh -e

DOCKER_IMG=docker-registry.wikimedia.org/releng/quibble-buster-php74
DOCKER_VERSION=1.6.0
DEPENDENCIES="mediawiki/extensions/SocialProfile mediawiki/skins/Vector"

cat <<-EOF > quibble.env
	ZUUL_VOTING=1
	MW_COMPOSER_MERGE_MW_IN_VENDOR=1
	EXT_NAME=CommentStreams
	ZUUL_PIPELINE=test
	ZUUL_BRANCH=master
	ZUUL_URL=git://contint2001.wikimedia.org
	ZUUL_PROJECT=mediawiki/extensions/CommentStreams
	ZUUL_REF=refs/zuul/master/Z98a5d9b0bc254f5b8a9ae3db2270f09b
	ZUUL_COMMIT=80c4478ecb513ca6556fc9e79a462ad54300e62f
EOF

podman run -it --rm \
  --env-file ./quibble.env \
  -v "$(pwd)"/cache:/cache \
  -v "$(pwd)"/cache:/nonexistent \
  -v "$(pwd)"/log:/log \
  -v "$(pwd)"/ref:/srv/git:ro \
  -v "$(pwd)"/docker-src:/workspace/src \
  "${DOCKER_IMG}":"${DOCKER_VERSION}" \
  $DEPENDENCIES

