1
+ /**
2
+ * @license
3
+ * Copyright 2022 Google LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
1
18
import { resolve } from 'path' ;
2
19
import chalk from 'chalk' ;
3
20
import simpleGit from 'simple-git' ;
@@ -17,12 +34,12 @@ interface DeployOptions {
17
34
/**
18
35
* Changes to these files require redeployment to the project backend.
19
36
*/
20
- const projectConfigGroups = [
37
+ const projectConfigGroups = [
21
38
{ file : 'config/firebase.json' , flag : 'all' } ,
22
- { file : 'config/firestore.rules' , flag : 'firestore' } ,
23
- { file : 'config/firestore.indexes.json' , flag : 'firestore' } ,
24
- { file : 'config/database.rules.json' , flag : 'database' } ,
25
- { file : 'config/functions/index.js' , flag : 'functions' }
39
+ { file : 'config/firestore.rules' , flag : 'firestore' } ,
40
+ { file : 'config/firestore.indexes.json' , flag : 'firestore' } ,
41
+ { file : 'config/database.rules.json' , flag : 'database' } ,
42
+ { file : 'config/functions/index.js' , flag : 'functions' }
26
43
] ;
27
44
28
45
async function deployIfNeeded ( ) {
@@ -55,9 +72,7 @@ async function deployIfNeeded() {
55
72
}
56
73
if ( flags [ 0 ] !== 'all' ) {
57
74
deployOptions . only = flags . join ( ',' ) ;
58
- console . log (
59
- chalk `{blue Deploying to ${ flags . toString ( ) } }`
60
- ) ;
75
+ console . log ( chalk `{blue Deploying to ${ flags . toString ( ) } }` ) ;
61
76
} else {
62
77
console . log (
63
78
chalk `{blue firebase.json changed - deploying full config directory. }`
@@ -66,4 +81,4 @@ async function deployIfNeeded() {
66
81
await firebaseTools . deploy ( deployOptions ) ;
67
82
}
68
83
69
- deployIfNeeded ( ) ;
84
+ deployIfNeeded ( ) ;
0 commit comments