I have a single codebase which I have deploying out to 2 firebase projects, dev
and prod
.
My .firebaserc
contains:
{
"projects": {
"default": "dev"
}
}
However, if i type firebase list
, i see
┌─────────────────────┬───────────────────────┬─────────────┐
│ Name │ Project ID / Instance │ Permissions │
├─────────────────────┼───────────────────────┼─────────────┤
│ dev │ dev │ Owner │
├─────────────────────┼───────────────────────┼─────────────┤
│ prod (current) │ prod │ Owner │
└─────────────────────┴───────────────────────┴─────────────┘
I see this is due to the actual project id being stored in ~/.config/configstore/firebase-tools.json
:
"activeProjects": {
"/mnt/d/testfb": "prod"
}
I'd like to know the order of precedence in determining the firebase project id to use. I looked at the firebase cli github, but unfortunately I got a bit lost trying to follow the files around.
Is it safe to assume that the firebase-tools.json
is the point of truth? If so, what is the purpose of the .firebaserc
file?