aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/get_skia_lkgr.sh
blob: 1c38dd5c4517c1105ac6a63c53fcb2948c1e1788 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# Copyright 2014 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Outputs the Last Known Good Revision of Skia.

source gbash.sh || exit

set -x -e

# Retrieve last known good revision. (App-engine script is very flaky, so retry
# 10 times.)
LKGR=""
for i in `seq 1 10`; do
  LKGR=$(curl "http://skia-tree-status-staging.appspot.com/lkgr")
  if [[ ${#LKGR} -gt 4 ]]; then
    break
  fi
done
[[ ${#LKGR} -gt 4 ]] || gbash::die "Unable to get Skia LKGR (got '${LKGR}')"
echo "${LKGR}"