diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml index 57056ec59..ae61be45f 100644 --- a/.github/workflows/mobile.yml +++ b/.github/workflows/mobile.yml @@ -17,8 +17,6 @@ jobs: - name: Install bootstrapper dependencies run: pipenv install --dev --deploy - run: | - current_dir=$(pwd) - echo $current_dir config_file=$(./scripts/vue_or_react.sh) pipenv run cookiecutter . --config-file $config_file --no-input -f cat $config_file @@ -60,12 +58,12 @@ jobs: path: my_project/ - name: Create config files run: | - cp resources/app-config-js-values.txt my_project/resources/app-config-js-values.txt - cp resources/eas-json-values.txt my_project/resources/eas-json-values.txt + cp resources/app.config.vars.txt my_project/resources/app.config.vars.txt + cp resources/eas.vars.txt my_project/resources/eas.vars.txt cd my_project current_dir=$(pwd) - . scripts/setup_mobile_config.sh "$current_dir/mobile/app.config.js" "$current_dir/resources/app-config-js-values.txt" - . scripts/setup_mobile_config.sh "$current_dir/mobile/eas.json" "$current_dir/resources/eas-json-values.txt" + . scripts/setup_mobile_config.sh "$current_dir/mobile/app.config.js" "$current_dir/resources/app.config.vars.txt" + . scripts/setup_mobile_config.sh "$current_dir/mobile/eas.json" "$current_dir/resources/eas.vars.txt" # - uses: actions/cache@v4 # with: diff --git a/resources/app-config-js-values.txt b/resources/app.config.vars.txt similarity index 100% rename from resources/app-config-js-values.txt rename to resources/app.config.vars.txt diff --git a/resources/eas-json-values.txt b/resources/eas.vars.txt similarity index 100% rename from resources/eas-json-values.txt rename to resources/eas.vars.txt diff --git a/{{cookiecutter.project_slug}}/clients/mobile/react-native/README.md b/{{cookiecutter.project_slug}}/clients/mobile/react-native/README.md index c9cfd4eef..e1aad464c 100644 --- a/{{cookiecutter.project_slug}}/clients/mobile/react-native/README.md +++ b/{{cookiecutter.project_slug}}/clients/mobile/react-native/README.md @@ -15,9 +15,11 @@ User `npm run start` to run the app and source the env variables alternatively if you want to use expo run command -`source .env && SENTRY_PROJECT=${SENTRY_PROJECT_NAME} npx expo start` +`source .env && npx expo start` -**When running the app locally and working against a local backend you will need to use a proxy** +Run against a local backend using the ip address instead of local host + +**When running the app locally and working against a local backend with a proxy** 1. Download and install ngrok 2. Set up ngrok auth token (request an account from William Huster) @@ -59,6 +61,20 @@ Set the `SENTRY_AUTH_TOKEN` in Expo under `Secrets` (see `Error Logging & Crash For local run set environment variables in .env file (from [.env.example](./.env.example)) For builds set env variables in eas.json + + +## Use the helper script to enter variables + +Complete the eas.vars.template.txt + +complete the app.config.vars.template.txt + +`. scripts/setup_mobile_config.sh eas.json /resources/eas.vars.txt` + +`. scripts/setup_mobile_config.sh eas.json /resources/app.config.vars.txt` + + + ### Eas Project Configuration in [app.config.js](./app.config.js) set the confiuration variables diff --git a/{{cookiecutter.project_slug}}/resources/app-config-js-values.txt b/{{cookiecutter.project_slug}}/resources/app.config.vars.template.txt similarity index 100% rename from {{cookiecutter.project_slug}}/resources/app-config-js-values.txt rename to {{cookiecutter.project_slug}}/resources/app.config.vars.template.txt diff --git a/{{cookiecutter.project_slug}}/resources/eas-json-values.txt b/{{cookiecutter.project_slug}}/resources/eas.vars.template.txt similarity index 100% rename from {{cookiecutter.project_slug}}/resources/eas-json-values.txt rename to {{cookiecutter.project_slug}}/resources/eas.vars.template.txt