File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ const pathToBackends = 'infra-gen2/backends';
56
56
void main (List <String > arguments) async {
57
57
final args = _parseArgs (arguments);
58
58
final verbose = args.flag ('verbose' );
59
+ final categoryToDeploy = args['category' ];
59
60
60
61
final bucketNames = < String > [];
61
62
@@ -64,6 +65,10 @@ void main(List<String> arguments) async {
64
65
65
66
print ('🚀 Deploying Gen 2 backends!' );
66
67
for (final backendGroup in infraConfig) {
68
+ if (categoryToDeploy != null &&
69
+ backendGroup.category.name != categoryToDeploy) {
70
+ continue ;
71
+ }
67
72
// TODO(equartey): Could be removed when all backends are defined.
68
73
if (backendGroup.backends.isEmpty) {
69
74
continue ;
@@ -172,6 +177,13 @@ ArgResults _parseArgs(List<String> args) {
172
177
abbr: 'v' ,
173
178
help: 'Run command in verbose mode' ,
174
179
defaultsTo: false ,
180
+ )
181
+ ..addOption (
182
+ 'category' ,
183
+ abbr: 'c' ,
184
+ help: 'Specify the category to deploy.' ,
185
+ allowed: Category .values.map ((e) => e.name).toList (),
186
+ defaultsTo: null ,
175
187
);
176
188
177
189
return parser.parse (args);
You can’t perform that action at this time.
0 commit comments