From 67a0935fc5e861a505ed467a99fc35dfdf2807a7 Mon Sep 17 00:00:00 2001 From: butomo1989 Date: Thu, 8 Nov 2018 12:54:20 +0100 Subject: [PATCH] Using custom_ami doesnt need android_version --- genymotion/example/sample_devices/aws.json | 1 - src/appium.sh | 10 ++++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/genymotion/example/sample_devices/aws.json b/genymotion/example/sample_devices/aws.json index 663d1af..b83932a 100755 --- a/genymotion/example/sample_devices/aws.json +++ b/genymotion/example/sample_devices/aws.json @@ -1,7 +1,6 @@ [ { "region": "eu-west-1", - "android_version": "6.0", "instance": "t2.small", "AMI": "ami-68d78411" }, diff --git a/src/appium.sh b/src/appium.sh index 0f22b30..b1d08ef 100644 --- a/src/appium.sh +++ b/src/appium.sh @@ -56,6 +56,12 @@ function prepare_geny_aws() { echo $instance echo $ami + #TODO: remove this dirty hack (this version will be ignored anyway!) + if [[ $android_version == null ]]; then + echo "[HACK] Version cannot be empty! version will be added!" + android_version="6.0" + fi + aws_tf_content=$(cat <<_EOF variable "aws_region_$index" { type = "string" @@ -63,8 +69,8 @@ variable "aws_region_$index" { } variable "android_version_$index" { - type = "string" - default = "$android_version" + type = "string" + default = "$android_version" } variable "instance_type_$index" {