functionfirebasefirebase-toolsgoogle-cloud-functions

firebase deploy --only functions overrides existing functions


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?


Solution

  • You can use firebase partial deploys

    $ firebase deploy --only functions:makeUppercase
    

    Will only deploy makeUppercase function.

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

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