So we ran into a bit of an issue. Our staging environment has a js config file that is copied during our build process. Same with production. However with codepush, we only get to release one set of code and then promote it. So this assumes that the js in Staging and Production are literally identical. In our case they are not as we reference different endpoints etc...
Is there anyway around this? One way would be if it was possible to deploy directly to production though obviously that's not ideal.
Hi @stueynet, thanks for reaching us. Promoted release in Production deployment will contain exactly the same code as the release in Staging deployment that has been used for promotion. By security reasons CodePush server does not change any code you pushed.
To test your releases you can use one of the following approaches:
Thanks @sergey-akhalkov. We actually changed out infrastructure a bit so that the codebase is the same no matter what and it looks at the environment to decide what config to use. This makes everything simpler.
Most helpful comment
Thanks @sergey-akhalkov. We actually changed out infrastructure a bit so that the codebase is the same no matter what and it looks at the environment to decide what config to use. This makes everything simpler.