blob: 2fc75b7e1e96cb0593bc4c2e5c2ea9ed40957daa [file] [log] [blame]
benjaminwagner787ca872015-08-17 12:58:10 -07001#!/bin/bash
2# Copyright 2014 Google Inc.
3#
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
7# Outputs the Last Known Good Revision of Skia.
8
benjaminwagner964eeba2015-10-20 13:00:48 -07009prodcertstatus -q || (echo "Please run prodaccess." 1>&2; exit 1)
10source gbash.sh || exit 2
benjaminwagner787ca872015-08-17 12:58:10 -070011
benjaminwagner964eeba2015-10-20 13:00:48 -070012set -e
benjaminwagner787ca872015-08-17 12:58:10 -070013
14# Retrieve last known good revision. (App-engine script is very flaky, so retry
15# 10 times.)
16LKGR=""
17for i in `seq 1 10`; do
18 LKGR=$(curl "http://skia-tree-status-staging.appspot.com/lkgr")
19 if [[ ${#LKGR} -gt 4 ]]; then
20 break
21 fi
22done
23[[ ${#LKGR} -gt 4 ]] || gbash::die "Unable to get Skia LKGR (got '${LKGR}')"
24echo "${LKGR}"