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