Forked from mjumbewu/browserstack_tunnel_setup.sh
Last active
August 29, 2015 14:24
-
-
Save mhodgson/7bfa819b5d9a080b9f92 to your computer and use it in GitHub Desktop.
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 | |
# Setup and start BrowserStack Tunnel for your TravisCI build | |
# | |
# This script was adopted from Santiago Suarez Ordoñez's Sauce Connect | |
# setup script: https://gist.github.com/santiycr/5139565/ | |
# | |
# This script requires your .travis.yml to include the following private | |
# env variable: | |
# | |
# * BROWSERSTACK_KEY | |
# | |
# You can find the access key for your account at | |
# http://www.browserstack.com/local-testing | |
# | |
# Curl and run this script as part of your .travis.yml before_script section: | |
# | |
# before_script: | |
# - curl https://gist.github.com/mhodgson/7bfa819b5d9a080b9f92/raw/browserstack_tunnel_setup.sh | bash | |
BROWSERSTACK_TUNNEL_URL="http://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip" | |
BROWSERSTACK_TUNNEL_DIR="/tmp/browserstack-$RANDOM" | |
# Download and extract the program | |
mkdir -p $BROWSERSTACK_TUNNEL_DIR | |
cd $BROWSERSTACK_TUNNEL_DIR | |
wget $BROWSERSTACK_TUNNEL_URL | |
unzip BrowserStackLocal-linux-x64.zip | |
# Start it | |
./BrowserStackLocal -v -onlyAutomate -localIdentifier $TRAVIS_JOB_NUMBER $BROWSERSTACK_KEY localhost,8001,0 & | |
# Wait a few seconds for it to be ready | |
sleep 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment