githubnemo / CompileDaemon

Very simple compile daemon for Go
BSD 2-Clause "Simplified" License
1.61k stars 153 forks source link

multiple build commands #54

Closed pjebs closed 3 years ago

pjebs commented 3 years ago

It would be great if multiple build commands could be run when file changes are detected:

1. docker build -t
2. docker-compose down
3. docker-compose up
githubnemo commented 3 years ago

Just write a shell script and execute it instead:

CompileDaemon -build "bash build.sh"

build.sh:

docker build -t
docker-compose down
docker-compose up
pjebs commented 3 years ago

This technique seems to still build go app: go build ....

My docker process already does the building

githubnemo commented 3 years ago

Sorry, I meant to write -build="bash build.sh". Edited my original comment.

pjebs commented 3 years ago

following your edited advice, I was losing the standard out messages from docker-compose up.

My workaround was:

CompileDaemon  -command "bash build.sh" -build="echo 'building'"
pjebs commented 3 years ago

Thanks

pjebs commented 3 years ago

Does this work on WIndows? It doesn't seem to work for my colleague?