From 8864e54f1f94883f3e22d7ce7ed87a699467a217 Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Wed, 11 Dec 2013 09:56:06 -0800 Subject: [PATCH] chore(scripts): refactor travis scripts Refactoring so that it's easier to use both SL/BS just depending on a global switch. --- .travis.yml | 9 ++++----- lib/sauce/sauce_connect_setup.sh | 4 ++-- travis_build.sh => scripts/travis/build.sh | 0 travis_print_logs.sh => scripts/travis/print_logs.sh | 0 .../travis/wait_for_browser_provider.sh | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) rename travis_build.sh => scripts/travis/build.sh (100%) rename travis_print_logs.sh => scripts/travis/print_logs.sh (100%) rename lib/sauce/sauce_connect_block.sh => scripts/travis/wait_for_browser_provider.sh (61%) diff --git a/.travis.yml b/.travis.yml index 3fd054aa011f..bec9ce8223d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,11 +9,10 @@ env: global: - SAUCE_USERNAME=angular-ci - SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987 - # rename to BROWSER_PROVIDER_READY_FILE - - SAUCE_CONNECT_READY_FILE=/tmp/sauce-connect-ready - BROWSER_STACK_USERNAME=VojtaJina - BROWSER_STACK_ACCESS_KEY=HAfHZaypxAc3PEUrUU9a - LOGS_DIR=/tmp/angular-build/logs + - BROWSER_PROVIDER_READY_FILE=/tmp/sauce-connect-ready before_script: - mkdir -p $LOGS_DIR @@ -22,10 +21,10 @@ before_script: - grunt bower - grunt bower - grunt package-without-bower - - ./lib/sauce/sauce_connect_block.sh + - ./scripts/travis/wait_for_browser_provider.sh script: - - ./travis_build.sh + - ./scripts/travis/build.sh after_script: - - ./travis_print_logs.sh + - ./scripts/travis/print_logs.sh diff --git a/lib/sauce/sauce_connect_setup.sh b/lib/sauce/sauce_connect_setup.sh index 5e8e138d1302..c49cff0a9a9c 100755 --- a/lib/sauce/sauce_connect_setup.sh +++ b/lib/sauce/sauce_connect_setup.sh @@ -36,8 +36,8 @@ ARGS="" if [ ! -z "$TRAVIS_JOB_NUMBER" ]; then ARGS="$ARGS --tunnel-identifier $TRAVIS_JOB_NUMBER" fi -if [ ! -z "$SAUCE_CONNECT_READY_FILE" ]; then - ARGS="$ARGS --readyfile $SAUCE_CONNECT_READY_FILE" +if [ ! -z "$BROWSER_PROVIDER_READY_FILE" ]; then + ARGS="$ARGS --readyfile $BROWSER_PROVIDER_READY_FILE" fi diff --git a/travis_build.sh b/scripts/travis/build.sh similarity index 100% rename from travis_build.sh rename to scripts/travis/build.sh diff --git a/travis_print_logs.sh b/scripts/travis/print_logs.sh similarity index 100% rename from travis_print_logs.sh rename to scripts/travis/print_logs.sh diff --git a/lib/sauce/sauce_connect_block.sh b/scripts/travis/wait_for_browser_provider.sh similarity index 61% rename from lib/sauce/sauce_connect_block.sh rename to scripts/travis/wait_for_browser_provider.sh index 126d37109713..1e8157c2b03a 100755 --- a/lib/sauce/sauce_connect_block.sh +++ b/scripts/travis/wait_for_browser_provider.sh @@ -2,6 +2,6 @@ # Wait for Connect to be ready before exiting -while [ ! -f $SAUCE_CONNECT_READY_FILE ]; do +while [ ! -f $BROWSER_PROVIDER_READY_FILE ]; do sleep .5 done