Firebase-tools: Specify multiple groups when deploying functions

Created on 5 Dec 2018  ·  5Comments  ·  Source: firebase/firebase-tools

Right now you can deploy specific functions via groups like this:
deploy --only functions:groupA (works)

It would seem natural to be able to specify multiple groups, e.g.:
deploy --only functions:groupA groupC (doesn't work)

As a feature request, support for specifying multiple groups when deploying functions would be much appreciated and a big help.

question

Most helpful comment

@rilian is correct.

From the firebase help deploy command:

--only <targets> only deploy to specified, comma-separated targets (e.g. "hosting,storage"). For functions, can specify filters with colons to scope function deploys to only those functions (e.g. "--only functions:func1,functions:func2"). When filtering based on export groups (the exported module object keys), use dots to specify group names (e.g. "--only functions:group1.subgroup1,functions:group2)"

All 5 comments

probably you should use deploy --only functions:groupA,functions:groupC

@rilian is correct.

From the firebase help deploy command:

--only <targets> only deploy to specified, comma-separated targets (e.g. "hosting,storage"). For functions, can specify filters with colons to scope function deploys to only those functions (e.g. "--only functions:func1,functions:func2"). When filtering based on export groups (the exported module object keys), use dots to specify group names (e.g. "--only functions:group1.subgroup1,functions:group2)"

Ah, great! In fact I tried comma separated, but missed the fact that ‘functions:’ must be repeated with each group.

Very happy to discover this. Thanks for the reference — next time I’ll be sure to check the help command!

Might be helpful it could be added to the documentation/example here as well: https://firebase.google.com/docs/cli/#deploy_specific_functions

It is.

image

Was this page helpful?
0 / 5 - 0 ratings