Search code examples
firebasefirebase-cli

Can the Firebase CLI run pre-deploy steps only?


I'm hooking up CI for a Firebase project that includes functions support. In cases where it's just a developer's branch, I want to lint and build the functions, but not deploy them. As best I can tell, the Firebase CLI does not support any kind of ability to run only the pre-deploy steps, so I've instead had to duplicate those steps inside my CI script. Ideally, I wouldn't have to do that because they're now in two places.

Can the Firebase CLI do some kind of dry-run deploy?


Solution

  • The CLI doesn't know how to do anything with function code other than deploy it. If you want to run lint or other npm targets, you'll have to execute the npm command directly ahead of time, as you are now.