2018-03-02 16:52:02 +00:00
|
|
|
#!/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.
|
|
|
|
|
2018-04-18 19:35:18 +00:00
|
|
|
set -e
|
|
|
|
|
2018-03-02 16:52:02 +00:00
|
|
|
BRANCH="${1:-origin/skqp/dev}"
|
|
|
|
COUNT="${2:-40}"
|
|
|
|
|
2018-04-18 19:35:18 +00:00
|
|
|
cd "$(dirname "$0")/../.."
|
|
|
|
|
|
|
|
EXTANT="$(mktemp "${TMPDIR:-/tmp}/extant.XXXXXXXXXX")"
|
|
|
|
BUCKET='skia-skqp'
|
|
|
|
gsutil ls "gs://$BUCKET" > $EXTANT
|
2018-03-02 16:52:02 +00:00
|
|
|
|
2018-04-18 19:35:18 +00:00
|
|
|
cat << EOF
|
2018-03-02 16:52:02 +00:00
|
|
|
<!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
|
|
|
|
short="$(git log -1 -\-format=%h $commit)"
|
2018-04-18 19:35:18 +00:00
|
|
|
name="${BUCKET}/skqp-universal-${short}.apk"
|
|
|
|
if ! grep -q "gs://$name" "$EXTANT"; then
|
2018-03-02 16:52:02 +00:00
|
|
|
continue
|
|
|
|
fi
|
2018-04-18 19:35:18 +00:00
|
|
|
url="https://storage.googleapis.com/$name"
|
2018-03-02 16:52:02 +00:00
|
|
|
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}"
|
2018-04-18 19:35:18 +00:00
|
|
|
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"
|
2018-03-02 16:52:02 +00:00
|
|
|
done
|
2018-04-18 19:35:18 +00:00
|
|
|
printf '</body>\n</head>\n'
|