0

I am deploying the development and production branches using git source control. The functions have a .firebaserc as below

$ cat .firebaserc

{
  "projects": {
    "default": "doodlemobileapp-dev"
  }
}

firebase deploy works fine and deploys to indicated project. But when to production branch I can see that the .firebasderc contents changed:

$ cat .firebaserc 

{
  "projects": {
    "default": "doodlemobileapp"
  }
}

This indicates that it changed the contents perfectly. However, doing a firebase deploy still deploys to doodlemobileapp-dev instead of doodlemobileapp.

Martin Zeitler
  • 1
  • 19
  • 155
  • 216
Vik
  • 8,721
  • 27
  • 83
  • 168

1 Answers1

4

You shouldn't change the .firebaserc file manually. Instead use the firebase use --project command to switch to a different project. See the documentation on project aliases

You could also set up separate targets within the same project, with https://firebase.google.com/docs/cli/targets. But I must admit I've never used that myself.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • 1
    not related. but do u know https://stackoverflow.com/questions/52266714/firebase-hosting-blocking-script-due-to-cors-issue ? u seems very experienced – Vik Sep 11 '18 at 18:15