handler_lastline.lua (662B)
1 -- Trun handler to store last line of build. 2 -- 3 -- interface 4 -- - handle(userdata, line): return status 5 -- - (optional) on_start(userdata): call once before start reading 6 -- - (optional) on_update(userdata, line, status): calls every time when status changed 7 -- - (optional) on_end(userdata): calls once after reading end 8 -- 9 return { 10 -- handle(userdata, line): return status 11 handle = function(_, line) return line end, 12 13 -- on_update(userdata, line, status): calls every time when status changed 14 on_update = function(_, _, status) 15 -- status contain last line of command output 16 -- For example we can parse progress if cmd is providing it. 17 end, 18 }