Don't rely on a fixed number of line to hide, expect first command
This commit is contained in:
parent
0965698c90
commit
1348678be1
11
works.go
11
works.go
@ -481,10 +481,15 @@ func declareAPIAuthWorksRoutes(router *gin.RouterGroup) {
|
||||
}
|
||||
|
||||
keeptLogs := []*drone.Line{}
|
||||
for nline, line := range result {
|
||||
firstCmdShown := false
|
||||
for _, line := range result {
|
||||
// Infos about image, skip
|
||||
if nline < 3 {
|
||||
continue
|
||||
if !firstCmdShown {
|
||||
if strings.HasPrefix(line.Message, "+ ") {
|
||||
firstCmdShown = true
|
||||
} else {
|
||||
continue
|
||||
}
|
||||
}
|
||||
if strings.HasPrefix(line.Message, "+ export GRADE") {
|
||||
continue
|
||||
|
Reference in New Issue
Block a user