how to detect finished successful build_runner?

Viewed 29

We need to be notified of the successful completion (or failure to re-run) of build_runner. I need to call its command in a bash file, but the program It does not close after the operation completes (successfully or unsuccessfully).

I want to use it in build automation steps (ci/cd). Please help on this particular issue thanks.

I use build_runner like below:

flutter pub run build_runner watch  --delete-conflicting-outputs
1 Answers

When using the watch and serve commands are intended for iterative development and do not set the exit code because they run for multiple builds and terminate when killed by the user.

I using build command and resolved problem:

flutter pub run build_runner build --delete-conflicting-outputs

refrence: github/issue

Related