Instabug / Instabug-React-Native

In-app feedback and bug reporting tool for React Native
https://instabug.com/platforms/react-native
MIT License
304 stars 100 forks source link

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

Closed a7medev closed 1 month ago

a7medev commented 2 months ago

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

Related issues

Jira ID: MOB-14399

Checklists

Development

Code review

InstabugCI commented 2 months ago

Coverage Report

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

Generated by :no_entry_sign: dangerJS against 89be7950f648f81b8b9ac1bb19b77f756a421b89

InstabugCI commented 2 months ago

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