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

feat: support run custom command after build succeeds #29

Merged
merged 2 commits into from
Feb 8, 2021

Conversation

YYCoder
Copy link
Contributor

@YYCoder YYCoder commented Feb 7, 2021

Under some circumstances, we need to run some custom commands after the build succeeds. For instance, we might need a shell environment to bootstrap our application, so, it does not meet our demand by run the output binary.

Support run custom command after every build succeeds, add an option run_cmd for YAML config to specify the command.

Since we might spawn many sub-processes after running a shell command, we have to make sure that every restart must kill all the sub-processes spawned by the command to clean up. I use go-ps to list all the processes and find every descendant process spawned by the command.

Hope it would help someone ~

@YYCoder YYCoder force-pushed the feat/support_custom_cmd branch 2 times, most recently from 17ca9e1 to b5c963f Compare February 7, 2021 09:43
@YYCoder YYCoder force-pushed the feat/support_custom_cmd branch from b5c963f to 1caefef Compare February 7, 2021 09:53
@silenceper silenceper merged commit 3a46a61 into silenceper:master Feb 8, 2021
@YYCoder YYCoder mentioned this pull request Feb 8, 2021
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

Successfully merging this pull request may close these issues.

2 participants