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
  • 59,798
  • 15
  • 122
  • 186
Vik
  • 7,983
  • 25
  • 77
  • 154

1 Answers1

3

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
  • 499,950
  • 69
  • 739
  • 734
  • 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