testing/web-platform/tests/tools/docker/start.sh
author Luke Zielinski <44509484+LukeZielinski@users.noreply.github.com>
Tue, 05 Mar 2019 11:09:11 +0000
changeset 464497 2719bb3a5d99ee2430d01cd24dc0d1cfe1e881a2
parent 464361 66b1aba3fb4372ec47986e728b1da9b32dd3d368
child 470874 9980646b6dd47a6e702e1cae1557effb76e4196e
permissions -rwxr-xr-x
Bug 1527331 [wpt PR 15334] - Fix shebangs and executable bits for a bunch of files, a=testonly Automatic update from web-platform-tests Fix shebangs and executable bits for a bunch of files (#15334) Mostly adding missing executable bits or removing unnecessary ones. In a few cases, missing shebangs were added. -- wpt-commits: bac4db35ea82fa0a6ee65e9291c722592e27fb7f wpt-pr: 15334

#!/bin/bash

# This script is embedded in the docker image, and so the image must be updated when changes
# to the script are made. To do this, assuming you have docker installed:
# In tools/docker/ :
#   docker build .
#   docker ps # and look for the id of the image you just built
#   docker tag <image> <tag>
#   docker push <tag>
# Update the `image` specified in the project's .taskcluster.yml file


set -ex

REMOTE=${1:-https://github.com/web-platform-tests/wpt}
REF=${2:-master}
REVISION=${3:-FETCH_HEAD}
BROWSER=${4:-all}
CHANNEL=${5:-nightly}

cd ~

mkdir web-platform-tests
cd web-platform-tests

git init
git remote add origin ${REMOTE}

# Initially we just fetch 50 commits in order to save several minutes of fetching
retry git fetch --quiet --depth=50 --tags origin ${REF}

if [[ ! `git rev-parse --verify -q ${REVISION}` ]];
then
    # But if for some reason the commit under test isn't in that range, we give in and
    # fetch everything
    retry git fetch -q --unshallow ${REMOTE}
    git rev-parse --verify ${REVISION}
fi
git checkout -b build ${REVISION}

source tools/ci/start.sh