From b074c71ae56046942db693292a22f0263e82e9f2 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 20 Jan 2018 14:10:55 +0200 Subject: Add: icktool show-latest-log --- icktool | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'icktool') diff --git a/icktool b/icktool index 3ad8c60..881cc68 100755 --- a/icktool +++ b/icktool @@ -307,6 +307,18 @@ class Icktool(cliapp.Application): self._report(code, 200, text) self.output.write(text) + def cmd_show_latest_log(self, args): + project = args[0] + builds = self._get_builds() + project_builds = [ + b + for b in builds['builds'] + if b['project'] == project + ] + if project_builds: + b = project_builds[-1] + self.cmd_show_log([b['build_id']]) + def cmd_get_blob(self, args): blob_id = args[0] blob_api = self._new_blob_api() -- cgit v1.2.1