aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/skqp/make_apk_list
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2018-03-02 11:52:02 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-02 16:54:50 +0000
commit8080a6e7050ec38aaa81c700e9db4bc2e3ec9009 (patch)
treef23f9b04a21c973306bfd64b40d755f7bee6d336 /tools/skqp/make_apk_list
parent685ede6341a48bde71c5cc503157504904c02a4d (diff)
SkQP: Host APK list on cloud; no more commits
No-Try: true Change-Id: I7f77c828cba2aa3763d495bec86d016eb65cb485 Reviewed-on: https://skia-review.googlesource.com/111741 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'tools/skqp/make_apk_list')
-rwxr-xr-xtools/skqp/make_apk_list60
1 files changed, 60 insertions, 0 deletions
diff --git a/tools/skqp/make_apk_list b/tools/skqp/make_apk_list
new file mode 100755
index 0000000000..9574101c08
--- /dev/null
+++ b/tools/skqp/make_apk_list
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+# Copyright 2018 Google Inc.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+BRANCH="${1:-origin/skqp/dev}"
+COUNT="${2:-40}"
+
+DST=$(mktemp)
+
+cat > "$DST" << EOF
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<meta charset="utf-8">
+<title>SkQP Pre-built APKs</title>
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<style>
+body {
+font-family:sans-serif;
+max-width:55em;
+margin:8px auto;
+padding:0 8px;
+}
+td { padding:12px 6px; }
+</style>
+</head>
+<body>
+<h1>SkQP Pre-built APKs</h1>
+<table>
+<tr>
+<th>APK</th>
+<th>Date</th>
+<th>Commit</th>
+</tr>
+EOF
+
+for commit in $(git log "$BRANCH" -${COUNT} -\-format=%H) ; do
+ printf '.' >&2
+ short="$(git log -1 -\-format=%h $commit)"
+ url="https://storage.googleapis.com/skia-skqp/skqp-universal-${short}.apk"
+ if [ 200 -ne "$(curl -s -o /dev/null -w "%{http_code}" "$url")" ] ; then
+ continue
+ fi
+ date=$(TZ='' git log -\-date='format-local:%Y-%m-%d %H:%M:%S %Z' -1 $commit -\-format=%cd)
+ subj=$(git log -1 $commit -\-format='%<(50,trunc)%s' | sed 's/ *$//')
+
+ commit_url="https://skia.googlesource.com/skia/+/${commit}"
+ {
+ printf '<tr>\n<td><a href="%s">skqp-universal-%s.apk</a></td>\n' "$url" "$short"
+ printf '<td>%s</td>\n<td><a href="%s">%s</a></td>\n</tr>\n' "$date" "$commit_url" "$subj"
+ } >> "$DST"
+done
+printf '</body>\n</head>\n' >> "$DST"
+
+echo
+
+echo 'gsutil -h "Content-Type:text/html" cp' \"$DST\" gs://skia-skqp/apklist
+echo 'https://storage.googleapis.com/skia-skqp/apklist'