diff options
Diffstat (limited to 'android/scripts')
| -rwxr-xr-x | android/scripts/generate-pngs.sh | 11 | ||||
| -rwxr-xr-x | android/scripts/run-instrumented-tests-locally.sh | 4 | ||||
| -rwxr-xr-x | android/scripts/run-instrumented-tests.sh | 6 |
3 files changed, 12 insertions, 9 deletions
diff --git a/android/scripts/generate-pngs.sh b/android/scripts/generate-pngs.sh index 6aa4aa380e..dc72e9f538 100755 --- a/android/scripts/generate-pngs.sh +++ b/android/scripts/generate-pngs.sh @@ -46,11 +46,12 @@ function convert_image() { local source_image="$1" local dpi_config="$2" + local destination_image if (( $# >= 3 )); then - local destination_image="$3" + destination_image="$3" else - local destination_image="$(basename "$source_image" .svg | sed -e 's/-/_/g')" + destination_image="$(basename "$source_image" .svg | sed -e 's/-/_/g')" fi if (( $# >= 4 )); then @@ -59,8 +60,10 @@ function convert_image() { local destination_dir="drawable" fi - local dpi="$(echo "$dpi_config" | cut -f1 -d'-')" - local size="$(echo "$dpi_config" | cut -f2 -d'-')" + local dpi + dpi="$(echo "$dpi_config" | cut -f1 -d'-')" + local size + size="$(echo "$dpi_config" | cut -f2 -d'-')" local dpi_dir="../lib/resource/src/main/res/${destination_dir}-${dpi}" diff --git a/android/scripts/run-instrumented-tests-locally.sh b/android/scripts/run-instrumented-tests-locally.sh index 359c648d30..4a642356eb 100755 --- a/android/scripts/run-instrumented-tests-locally.sh +++ b/android/scripts/run-instrumented-tests-locally.sh @@ -4,7 +4,7 @@ set -eu SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd $SCRIPT_DIR/.. +cd "$SCRIPT_DIR"/.. ./gradlew assembleOssProdAndroidTest ./gradlew app:assembleOssProdDebug -$SCRIPT_DIR/run-instrumented-tests.sh app +"$SCRIPT_DIR"/run-instrumented-tests.sh app diff --git a/android/scripts/run-instrumented-tests.sh b/android/scripts/run-instrumented-tests.sh index 5e3320533f..e72d4687bd 100755 --- a/android/scripts/run-instrumented-tests.sh +++ b/android/scripts/run-instrumented-tests.sh @@ -23,7 +23,7 @@ INVALID_TEST_ACCOUNT_TOKEN="${INVALID_TEST_ACCOUNT_TOKEN:-}" while [[ "$#" -gt 0 ]]; do case $1 in --test-type) - if [[ ! -z ${2-} && "$2" =~ ^(app|mockapi|e2e)$ ]]; then + if [[ -n "${2-}" && "$2" =~ ^(app|mockapi|e2e)$ ]]; then TEST_TYPE="$2" else echo "Error: Bad or missing test type. Must be one of: app, mockapi, e2e" @@ -32,7 +32,7 @@ while [[ "$#" -gt 0 ]]; do shift 2 ;; --infra-flavor) - if [[ ! -z ${2-} && "$2" =~ ^(prod|stagemole)$ ]]; then + if [[ -n "${2-}" && "$2" =~ ^(prod|stagemole)$ ]]; then INFRA_FLAVOR="$2" else echo "Error: Bad or missing infra flavor. Must be one of: prod, stagemole" @@ -41,7 +41,7 @@ while [[ "$#" -gt 0 ]]; do shift 2 ;; --billing-flavor) - if [[ ! -z ${2-} && "$2" =~ ^(oss|play)$ ]]; then + if [[ -n "${2-}" && "$2" =~ ^(oss|play)$ ]]; then BILLING_FLAVOR="$2" else echo "Error: Bad or missing billing flavor. Must be one of: oss, play" |
