diff --git a/resources/eas-json-values.txt b/resources/eas-json-values.txt index f0a9bcfad..038e4e8eb 100644 --- a/resources/eas-json-values.txt +++ b/resources/eas-json-values.txt @@ -14,4 +14,5 @@ REPLACE_WITH_APPSTORE_CONNECT_APP_NAME=TN Bootsrapper RN REPLACE_WITH_APPLE_ID_EMAIL_SIGNING_APP=pari@thinknimble.com REPLACE_WITH_APPLESTORE_CONNECT_ID=6446805695 REPLACE_WITH_APPLE_TEAM_ID=6BNA6HFF6B +REPLACE_WITH_REVIEW_APP_SENTRY_PROJECT_NAME=tn-bootsrapper-rn diff --git a/{{cookiecutter.project_slug}}/resources/eas-json-values.txt b/{{cookiecutter.project_slug}}/resources/eas-json-values.txt index 225945ab4..f8cd02ede 100644 --- a/{{cookiecutter.project_slug}}/resources/eas-json-values.txt +++ b/{{cookiecutter.project_slug}}/resources/eas-json-values.txt @@ -14,3 +14,4 @@ REPLACE_WITH_APPSTORE_CONNECT_APP_NAME= REPLACE_WITH_APPLE_ID_EMAIL_SIGNING_APP= REPLACE_WITH_APPLE_TEAM_ID= REPLACE_WITH_APPLESTORE_CONNECT_ID= +REPLACE_WITH_REVIEW_APP_SENTRY_PROJECT_NAME= diff --git a/{{cookiecutter.project_slug}}/scripts/setup_mobile_config.sh b/{{cookiecutter.project_slug}}/scripts/setup_mobile_config.sh index 7f7f30b64..4cde1f68d 100644 --- a/{{cookiecutter.project_slug}}/scripts/setup_mobile_config.sh +++ b/{{cookiecutter.project_slug}}/scripts/setup_mobile_config.sh @@ -9,11 +9,11 @@ config_file=mobile/$1 defaults_file=resources/$2 -declare -a replace_with +declare -a config_vars declare -a merged_arr while IFS= read -r line; do - replace_with+=("$line") + config_vars+=("$line") done < <(grep -o "REPLACE_WITH_[A-Z_]*" "$config_file") while IFS= read -r line; do @@ -21,13 +21,18 @@ while IFS= read -r line; do done < <(grep -o "REPLACE_WITH_[A-Z_]*" "$defaults_file") -for i in "${replace_with[@]}"; do +for i in "${config_vars[@]}"; do value=$(grep -o "$i=.*" "$defaults_file") + if [[ -z $value ]]; then + echo "Skipping $i as it does not exist in $defaults_file" + continue + fi + value=${value#*=} value=$(printf '%q' "$value") - # echo $i has value $value if [[ -n $value ]]; then - # replace that name in the file with the value sed -i.bak "s#<$i>#$value#g" "$config_file" - fi + else + echo "Skipping $i as it does not exist in $defaults_file" + fi done \ No newline at end of file