0

In same Firebase project I have a node app with several functions and another app with only scheduled functions (because for some reason, I encountered side effects if deployed together in same app).

Each time I deploy the app with only scheduled functions, it tells me that other functions are not present in the source code (obviously) and asks me if I want to delete them.

Is there a way to tag functions as permanent and avoid each time to have to chose to not delete them ?

1 Answer 1

2

When you deploy Cloud Functions through the Firebase CLI, it expects that you pass it a index.js/index.ts that contains all the functions for that entire project.

There is no way to tag certain Cloud Functions as permanent. I usually explicitly tell Cloud Functions what functions I'm deploying in situations such as yours, with firebase deploy --only functions:function1,function2.

For more on this option, see the reference documentation on deploying specific functions. The option to group the functions sounds especially useful for your scenario, as you could group them by app.

Sign up to request clarification or add additional context in comments.

1 Comment

Grouping suggestion is good enough for my use case, thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.