feat: log event
This commit is contained in:
parent
a67ef6f2d8
commit
49a72dc34b
|
@ -45,10 +45,12 @@ func (w *watcher) Listen(binaryPath, scriptPath string, outputErr chan<- error)
|
||||||
outputErr <- errEventsClosedChan
|
outputErr <- errEventsClosedChan
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if !event.Has(fsnotify.Write) {
|
if !event.Has(fsnotify.Write) {
|
||||||
log.Printf("is not Write: %s\n", event.Name)
|
log.Printf("is not Write: %s\n", event.Name)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
log.Printf("event: %s | op: %s \n", event.Name, event.Op)
|
||||||
|
|
||||||
if err := w.deploy(binaryPath, scriptPath); err != nil {
|
if err := w.deploy(binaryPath, scriptPath); err != nil {
|
||||||
log.Printf("deploy: %s\n", err)
|
log.Printf("deploy: %s\n", err)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo "hello"
|
echo "deploy script has been called"
|
Loading…
Reference in New Issue