From 49f219723d6d02d62ff7281a05198d6f7ab413f5 Mon Sep 17 00:00:00 2001 From: Sefa Ilkimen Date: Wed, 12 Dec 2018 19:46:58 +0100 Subject: [PATCH] Fix test scripts for linux bash --- scripts/build-test-app.sh | 6 +++--- scripts/release.sh | 2 +- scripts/test-app.sh | 2 +- scripts/update-tough-cookie.sh | 2 +- scripts/upload-artifact.sh | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/build-test-app.sh b/scripts/build-test-app.sh index e8e021a6..1f563441 100755 --- a/scripts/build-test-app.sh +++ b/scripts/build-test-app.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/.. +ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd ..; pwd )" WORKINGCOPY=$ROOT/temp/workingcopy CDV=$ROOT/node_modules/.bin/cordova @@ -37,9 +37,9 @@ done rm -rf $ROOT/temp mkdir $ROOT/temp -cp -r $ROOT/test/app-template/ $ROOT/temp/ +cp -r $ROOT/test/app-template/. $ROOT/temp/ cp $ROOT/test/app-test-definitions.js $ROOT/temp/www/ -rsync -ax --exclude node_modules --exclude scripts --exclude temp --exclude test $ROOT $WORKINGCOPY +rsync -ax --exclude node_modules --exclude scripts --exclude temp --exclude test $ROOT/. $WORKINGCOPY cd $ROOT/temp $CDV prepare $CDV plugins add $WORKINGCOPY diff --git a/scripts/release.sh b/scripts/release.sh index b27bf99d..543ab0b2 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/.. +ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd ..; pwd )" pushd $ROOT VERSION=$(node -e "console.log(require('./package.json').version)") diff --git a/scripts/test-app.sh b/scripts/test-app.sh index 16402585..317bb039 100755 --- a/scripts/test-app.sh +++ b/scripts/test-app.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/.. +ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd ..; pwd )" if [ $CI == "true" ] && ([ -z $SAUCE_USERNAME ] || [ -z $SAUCE_ACCESS_KEY ]); then echo "Skipping CI tests, because Saucelabs credentials are not set."; diff --git a/scripts/update-tough-cookie.sh b/scripts/update-tough-cookie.sh index 1931d591..4a9ec22a 100755 --- a/scripts/update-tough-cookie.sh +++ b/scripts/update-tough-cookie.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/.. +ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd ..; pwd )" cd $ROOT npm i diff --git a/scripts/upload-artifact.sh b/scripts/upload-artifact.sh index e0234f47..2f2e833d 100755 --- a/scripts/upload-artifact.sh +++ b/scripts/upload-artifact.sh @@ -2,7 +2,7 @@ set -e PLATFORM=$([[ "${@#--android}" = "$@" ]] && echo "ios" || echo "android") -ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/.. +ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd ..; pwd )" TEMP=$ROOT/temp if [ -z $SAUCE_USERNAME ] || [ -z $SAUCE_ACCESS_KEY ]; then