bugsnag / bugsnag-expo

MIT License
11 stars 5 forks source link

Publish release on production profile only #134

Open krisgerhard opened 1 year ago

krisgerhard commented 1 year ago

Currently it appears to not be possible to upload sourcemaps conditionally for iOS. Maybe the right question is "Why is there different logic for Android and IOS source map upload trigger?"

With Android it is possible via eas-build-on-success hook. Example:

package.json

"eas-build-on-success": "./eas-build-on-success.sh"

eas-build-on-success.sh

#!/bin/bash

if [[ "$EAS_BUILD_PROFILE" == "production" ]]; then
  echo "Production profile detected."
  npx bugsnag-eas-build-on-success
else
  echo "Non-production profile detected. Skipping hook."
fi

Due to iOS not using this hook I cannot control the conditions for publishing release & uploading sourcemaps.

Let's harmonize the logic?

johnkiely1 commented 1 year ago

Thanks for raising, we are discussing internally on the best way to approach this. We will update soon.

johnkiely1 commented 1 year ago

Hi @krisgerhard, we have now added something to our backlog to align approaches across both iOS and Android. We are still working on the specifics as there is some inconsistency in the Expo and RN default approaches to source map generation in different release types. We will post here with updates as we have them.