Dynamically generating app.json?


#1

I have an open source app, and until now everything in my app.json could be public. But now I’m integrating Sentry, and need to include the API key. I still would like for the rest of app.json to be version controlled, so I don’t want to gitignore the whole file. Ideally I’d rely on an ignored file or environment variable with just the API key in it. Is there a way to dynamically generate the app.json at the time of exp publish (and other related commands) so that I can include the API key?


#2

It seems a bit off (at best) that the official docs make no reference to the fact that, by storing your token in app.json, you’ll be committing credentials to version control - a huge no-no.

Did a little searching and it turns out there’s a much better way: you can use a SENTRY_AUTH_TOKEN environment variable to pass the auth token into sentry-expo:


#3

This is great, thanks for finding it. I agree the documentation should mention this option!


closed #4

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.