Skip to content
This repository was archived by the owner on Feb 5, 2022. It is now read-only.

Commit ae9d164

Browse files
author
Matt Moran
committed
test(deploy): test travis deployment to firebase 4
test travis deployment to firebase 4
1 parent 8ab4316 commit ae9d164

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

scripts/deploy.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,19 @@ var branch = process.env.TRAVIS_BRANCH,
44
pr = process.env.TRAVIS_PULL_REQUEST,
55
pr_branch = process.env.TRAVIS_PULL_REQUEST_BRANCH;
66

7+
var token = process.env.FIREBASE_TOKEN
8+
79
function deployToFirebase(project) {
810
return new Promise(function (resolve, reject) {
911
console.log('Deploying to firebase project openforge-'+project);
10-
var child = exec('npm run firebase:deploy:'+project);
12+
13+
var child;
14+
if(project === "dev"){
15+
child = exec("firebase use default && firebase deploy --token " + token);
16+
} else {
17+
child = exec("firebase use production && firebase deploy --token " + token);
18+
}
19+
child = exec('npm run firebase:deploy:'+project);
1120

1221
child.stdout.on('data', function (data) {
1322
process.stdout.write(data);

0 commit comments

Comments
 (0)