firebase deploy --only functions overrides existing functions

Quan Vuong picture Quan Vuong · Mar 12, 2017 · Viewed 32.1k times · Source

Running firebase deploy --only functions deletes the existing functions before creating new ones. Is it possible to modify this behavior to create if not exist, update if exists, no actions if functions not being deployed?

Answer

Pablo Albaladejo picture Pablo Albaladejo · Jun 12, 2017

You can use firebase partial deploys

$ firebase deploy --only functions:makeUppercase

Will only deploy makeUppercase function.

Hope it helps.

Note: To deploy more than one function at once (but not all) use:

$ firebase deploy --only functions:function1,functions:function2