Skip to content

Commit

Permalink
fix(all-general): fix rtdb instances list command
Browse files Browse the repository at this point in the history
  • Loading branch information
albertodigioacchino committed Feb 8, 2021
1 parent cb08c5f commit 9a9e2cf
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 9a9e2cf

Please sign in to comment.