Working on creating two separate Firebase Projects, one as a dev environment and the other as our production environment so as to simulate the real thing when testing new features.
Whenever I need to deploy to the cloud functions to either of the projects I do the following things:
Copy and paste the correct service account credentials into the service-account-credentials.json file
Select respective project's alias (dev or prod)
firebase use dev or firebase use prod
- Deploy cloud functions to respective project
firebase deploy --only functions
I feel like this is the naive and tedious way of doing this. Is there a better way of doing this where I can have a service-account-credentials-prod.json and a service-account-credentials-dev.json file in my functions directory, then depending on which project alias I'm using, it will know which service account credentials to deploy?
Would greatly appreciate if someone could point me in the right direction