Skip to content

Commit

Permalink
Merge pull request #168 from eficode/fix/firebase-cli-rtdb-instances
Browse files Browse the repository at this point in the history
fix(all-general): fix rtdb instances list command
  • Loading branch information
rams23 authored Feb 8, 2021
2 parents cb08c5f + 9a9e2cf commit 56637c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scripts/load-rules-to-rtdb-instances.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ async function loadRulesToRTDBInstances(app) {
await fetch(databaseURL, {method: 'PUT', body: databaseRules})
}
} else {
const locations = ['europe-west1', 'us-central1'];
const locations = ['europe-west1'];
let instancesList = [];
for (const location of locations) {
const listDatabases = firebaseTools.database.instances.list
const databases = await listDatabases({location});
const databases = await listDatabases({location, project: process.env.FIREBASE_PROJECT_ID});
instancesList = [...instancesList, ...databases];
}
await run(`firebase target:clear database main --project $FIREBASE_PROJECT_ID`);
Expand Down
4 changes: 2 additions & 2 deletions scripts/pre-deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ async function copyPackages() {
}

async function fillRtdbInstancesFile() {
const locations = ['europe-west1', 'us-central1'];
const locations = ['europe-west1'];
let instancesList = [];
for (const location of locations) {
const listDatabases = firebaseTools.database.instances.list
const databases = await listDatabases({location});
const databases = await listDatabases({location, project: process.env.FIREBASE_PROJECT_ID});
instancesList = [...instancesList, ...databases.map(d => ({
url: `https://${d.instance}.${location}.firebasedatabase.app`,
name: d.instance,
Expand Down

0 comments on commit 56637c9

Please sign in to comment.