Open flowchartsman opened 3 years ago
If I'm reading this right, another option that occurs is just rebuilding and terminating the daemon if root files are changed.
**/*.go !**/*_test.go !cmd/** {
prep: //build cmd1
prep: //build cmd2, etc
prep: killall cmd1 cmd2
}
cmd/cmd1/**/*.go {
prep: //build cmd1
daemon +sigterm: cmd1
}
//and similarly for cmd2
About to start playing around with this project for development in containers with a project structured like so:
I would like to just run both commands with
daemon
directives inside a shared container. If any of the shared code changes, I'd like to rebuild them both, but I'd only like to rebuildcmd1
if one of its files have changed and likewise forcmd2
Would I need to have blocks for each of them like the following (assuming I also wish to skip
*_test.go
files?Would this work, or is there a better way? Perhaps by excluding
cmd
from the base container and then explicitly mounting the relevant command in each image.