fix: add more logs

This commit is contained in:
Urko. 2024-05-30 12:29:17 +02:00
parent d22a6816c4
commit 99236b5fb5
1 changed files with 3 additions and 0 deletions

View File

@ -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
}