Skip to content

Commit 7535201

Browse files
committed
npm install functions if needed
1 parent 07064c2 commit 7535201

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scripts/ci-test/deploy-if-needed.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import { resolve } from 'path';
2424
import chalk from 'chalk';
2525
import simpleGit from 'simple-git';
26+
import { exec } from 'child-process-promise';
2627
const firebaseTools = require('firebase-tools');
2728

2829
const root = resolve(__dirname, '../..');
@@ -83,6 +84,12 @@ async function deployIfNeeded() {
8384
chalk`{blue firebase.json changed - deploying full config directory. }`
8485
);
8586
}
87+
if (flags[0] === 'all' || flags.includes('functions')) {
88+
// npm install the dependencies for functions
89+
await exec('npm install', {
90+
cwd: resolve(__dirname, '../config/functions')
91+
});
92+
}
8693
await firebaseTools.deploy(deployOptions);
8794
}
8895

0 commit comments

Comments
 (0)