We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
I wanted to use the watcher to run make when a go file is modified. Here is how I thought it would/should work:
make
watcher -cmd="make all" *.go
However it works only for current directory. It does not watch for changes that are in packages. Sample file structure:
. ├── c │ └── g.go ├── foo.go ├── foo_test.go ├── go.mod ├── go.sum ├── Makefile
Test:
$:~/repos/seed$ watcher -list -cmd="make all" *.go /home/rpajak/repos/seed/foo.go: foo.go /home/rpajak/repos/seed/foo_test.go: foo_test.go Watching 2 files
Notice that c/g.go is not being watched.
c/g.go
The text was updated successfully, but these errors were encountered:
One possible approach could be forming a list of *.go files to be fed to watcher, like following:
*.go
watcher -dotfiles=false -startcmd=true -cmd=watcher.sh $(find ../../ -type f -name \"*.go\" -exec echo {} \+)
However it has one downside however, to include newly created files you will need restart this process, which can be automated as well I believe.
Sorry, something went wrong.
I'm using the following cmd
watcher -cmd="./build.sh" -pipe=true $(find $directory -type f -name "*.go" -not -path "./cdk.out/*" | tr '\n' ' ')
It will watch all go files in all subdirectories from your current dir
No branches or pull requests
Hello,
I wanted to use the watcher to run
make
when a go file is modified.Here is how I thought it would/should work:
However it works only for current directory. It does not watch for changes that are in packages. Sample file structure:
Test:
Notice that
c/g.go
is not being watched.The text was updated successfully, but these errors were encountered: