Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: run a certain command if any step fails #94

Open
devdoshi opened this issue Apr 10, 2020 · 1 comment
Open

Feature: run a certain command if any step fails #94

devdoshi opened this issue Apr 10, 2020 · 1 comment

Comments

@devdoshi
Copy link

I am currently using wsrun and watch as follows:

yarn run watch --filter=watch-filter.js "yarn wsrun --stages --report --fast-exit ws:build"

Since I am not looking at it most of the time while it is running, it would be nice to be able to hook onto the completion of any "run" (once all stages succeed, or any fails). For example, if it fails I'd like to get a system notification of the failure, and if it succeeds I'd like to see how long it took or the last time it ran, etc. when I next go back to the terminal. I'm guessing this would be another option that specifies a command to be run on complete, which gets passed a success/failure, or one command to be run on success and one to be run on failure. Or it could be all the different hooks in the lifecycle (started, stopped, etc.).

I am glad to contribute a PR, but I would appreciate some high level guidance if you have any preference on how I do that. Please let me know if you need any further information from me.

Thanks for this project!

@devdoshi
Copy link
Author

devdoshi commented Apr 10, 2020

Also, I have a version working with && and ||

yarn run watch --filter=watch-filter.js "on-start.sh && yarn wsrun --stages --report --fast-exit ws:build && on-success.sh || on-failure.sh"

which achieves my basic goals, but it would be nicer if wsrun had the hooks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant