firebase / firebase/firebase-tools
firebse deploy always points to the same database
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
firebase --version
7.6.1
I'm trying to use the .firebaserc and firebase.json files to set up a development and test environment. I've tried a number of things but every time I use _>firebase use test_ and _>firebase deploy_ the result is it uses the dev firebase project still. Below are my .firebaerc file and my firebase.json. I could really use some help sorting this out because I've searched and followed all relevant posts but never can I get the deploy to change the database project. It does change the hosting just not the database. Thanks in advance for help I've spent too many hours on this and just needed someone with more experience to point the way.
.firebaserc
```
{
"projects": {
"default": "myprojdev",
"test": "myprojtest",
"dev": "myprojdev"
},
"targets": {
"myprojtest": {
"database": {
"main": [
"myprojdbtest"
]
}
},
"myprojdev": {
"database": {
"main": [
"myprojdbdev"
]
}
}
}
}
```
And my firebase.json
```
{
"hosting": {
"public": "dist",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"headers": [
{
"source": "/service-worker.js",
"headers": [{ "key": "Cache-Control", "value": "no-cache" }]
}
]
},
"database": [{ "target": "main" }]
}
```
Contributor guide
Assessment
This issue has not been assessed yet.