Instabug-React-Native icon indicating copy to clipboard operation
Instabug-React-Native copied to clipboard

feat(ios): read env vars from .xcode.env in sourcemaps script

Open a7medev opened this issue 9 months ago • 2 comments

Description of the change

Support reading environment variables from ios/.xcode.env and ios/.xcode.env.local files when present in the iOS source maps upload script, these files are used by React Native for configuring environment variables for the iOS build like the path for the node binary (NODE_BINARY) and the entry file (ENTRY_FILE).

This will allow the users to easily configure Instabug-related environment variables for the sourcemaps script, avoiding issues with Xcode build phases not having access to environment variables defined in ~/.bashrc, ~/.bash_profile, etc.

This is implemented in React Native's scripts that run as part of the iOS build in scripts/xcode/with-environment.sh, I didn't reuse the script in React Native though since it's only available starting from React Native v0.69.0 and we want the script to be backward-compatible.

Type of change

  • [ ] Bug fix (non-breaking change that fixes an issue)
  • [ ] New feature (non-breaking change that adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Related issues

Jira ID: MOB-14399

Checklists

Development

  • [ ] Lint rules pass locally
  • [ ] The code changed/added as part of this pull request has been covered with tests

Code review

  • [ ] This pull request has a descriptive title and information useful to a reviewer
  • [ ] Issue from task tracker has a link to this pull request

a7medev avatar May 03 '24 13:05 a7medev

Coverage Report

Label Coverage Status
JavaScript 96.3%
Android 48.3%
iOS 42.3%

Generated by :no_entry_sign: dangerJS against 89be7950f648f81b8b9ac1bb19b77f756a421b89

InstabugCI avatar May 03 '24 13:05 InstabugCI

Your snapshot has been generated! :rocket:

Installation

You can install the snapshot through NPM:

npm install https://github.com/Instabug/Instabug-React-Native\#snapshot/13.0.0-MOB-14399

or Yarn:

yarn add https://github.com/Instabug/Instabug-React-Native\#snapshot/13.0.0-MOB-14399

InstabugCI avatar May 03 '24 13:05 InstabugCI