fix: add more logs
This commit is contained in:
parent
d22a6816c4
commit
99236b5fb5
3
main.go
3
main.go
|
@ -82,6 +82,7 @@ func handlePayload(secret string, projects map[string][]config.ConfigScript) fun
|
|||
return
|
||||
}
|
||||
branchName := strings.Split(payload.Ref, "/")[len(strings.Split(payload.Ref, "/"))-1]
|
||||
log.Println("branchName", branchName)
|
||||
found = false
|
||||
var scr config.ConfigScript
|
||||
for i := range proj {
|
||||
|
@ -102,6 +103,7 @@ func handlePayload(secret string, projects map[string][]config.ConfigScript) fun
|
|||
if err := execute(scr.Command, scr.Arguments...); err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
log.Println("script was deployed successful")
|
||||
}()
|
||||
})
|
||||
}
|
||||
|
@ -114,6 +116,7 @@ func execute(command string, args ...string) error {
|
|||
if err := cmd.Run(); err != nil {
|
||||
return fmt.Errorf("cmd.Run %w", err)
|
||||
}
|
||||
log.Println()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue