aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/skqp
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2018-05-31 12:45:44 -0400
committerGravatar Hal Canary <halcanary@google.com>2018-05-31 16:46:40 +0000
commit0390d3e36b24679dd63d8aad90f90cb1cb086333 (patch)
tree1a233015befff3f4a81f2b3a6bcd7d8bc278b041 /tools/skqp
parentc83a0deaa8d4d94450424c4c8eed53e70b25365c (diff)
skqp: update apk list script
Change-Id: I3e8cfdc246d6f264675b307c1f5004438f3ed8b6 Reviewed-on: https://skia-review.googlesource.com/131142 Reviewed-by: Hal Canary <halcanary@google.com>
Diffstat (limited to 'tools/skqp')
-rwxr-xr-xtools/skqp/make_apk_list53
1 files changed, 30 insertions, 23 deletions
diff --git a/tools/skqp/make_apk_list b/tools/skqp/make_apk_list
index 75f7a3c6b5..1cc25e475e 100755
--- a/tools/skqp/make_apk_list
+++ b/tools/skqp/make_apk_list
@@ -6,13 +6,12 @@
set -e
-BRANCH="${1:-origin/skqp/dev}"
-COUNT="${2:-40}"
+COUNT=40
+BUCKET='skia-skqp'
cd "$(dirname "$0")/../.."
EXTANT="$(mktemp "${TMPDIR:-/tmp}/extant.XXXXXXXXXX")"
-BUCKET='skia-skqp'
gsutil ls "gs://$BUCKET" > $EXTANT
cat << EOF
@@ -34,25 +33,33 @@ td { padding:12px 6px; }
</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)"
- name="${BUCKET}/skqp-universal-${short}.apk"
- if ! grep -q "gs://$name" "$EXTANT"; then
- continue
- fi
- url="https://storage.googleapis.com/$name"
- 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"
-done
-printf '</body>\n</head>\n'
+table() {
+ printf '<h2>%s</h2>\n' "$*"
+ printf '<table>\n<tr><th>APK</th><th>Date</th><th>Commit</th></tr>\n'
+ for commit in $(git log "$@" -${COUNT} --format=%H) ; do
+ short="$(git log -1 --format=%h $commit)"
+ name="${BUCKET}/skqp-universal-${short}.apk"
+ if ! grep -q "gs://$name" "$EXTANT"; then
+ url=''
+ else
+ url="https://storage.googleapis.com/$name"
+ 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}"
+ if [ "$url" ]; then
+ printf '<tr>\n<td><a href="%s">skqp-universal-%s.apk</a></td>\n' "$url" "$short"
+ else
+ printf '<tr>\n<td>%s</td>\n' "$short"
+ fi
+ printf '<td>%s</td>\n<td><a href="%s">%s</a></td>\n</tr>\n' "$date" "$commit_url" "$subj"
+ done
+ printf '</table>\n'
+}
+
+table "origin/skqp/release" "^origin/skqp/dev"
+table "origin/skqp/dev"
+
+printf '</body>\n</html>\n'