Home > Back-end >  If I do 'firebase deploy' to deploy only one new cloud function will the earlier cloud fun
If I do 'firebase deploy' to deploy only one new cloud function will the earlier cloud fun

Time:10-16

I am using firestore and have deployed some cloud functions already. I want to deploy another new cloud function. Can I deploy the new cloud function by itself, or do I have to redeploy the old functions too?

CodePudding user response:

Can I deploy the new cloud function by itself, or do I have to redeploy the old functions too?

You can deploy a single function by deploying it's name with the following command:

firebase deploy --only functions:functionName

This does not affect any other functions. If you are deploying all the functions and there are some functions that are not present in your local code, the CLI might ask you if you want to keep them or delete them.

Also, starting from v11.13.0, the CLI will skip a function if it has not been changed since last deployment.

  • Related