File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Check Tombstone Proto Schema
2+
3+ on :
4+ schedule :
5+ - cron : ' 0 9 * * *'
6+ workflow_dispatch :
7+
8+ jobs :
9+ check :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - uses : actions/checkout@v6
14+
15+ - name : Check for newer Tombstone proto schema
16+ run : ./scripts/check-tombstone-proto-schema.sh
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ TRACKED_COMMIT=" 981d145117e8992842cdddee555c57e60c7a220a"
5+
6+ # tail -n +2 to remove the magic anti-XSSI prefix from the Gitiles JSON response
7+ LATEST_COMMIT=$( curl -sf \
8+ ' https://android.googlesource.com/platform/system/core/+log/refs/heads/main/debuggerd/proto/tombstone.proto?format=JSON' \
9+ | tail -n +2 \
10+ | jq -r ' .log[0].commit' )
11+
12+ if [ -z " $LATEST_COMMIT " ] || [ " $LATEST_COMMIT " = " null" ]; then
13+ echo " ERROR: Failed to fetch latest commit from Gitiles" >&2
14+ exit 1
15+ fi
16+
17+ echo " Tracked commit: $TRACKED_COMMIT "
18+ echo " Latest commit: $LATEST_COMMIT "
19+
20+ if [ " $LATEST_COMMIT " != " $TRACKED_COMMIT " ]; then
21+ echo " Schema has been updated! Latest: https://android.googlesource.com/platform/system/core/+/${LATEST_COMMIT} /debuggerd/proto/tombstone.proto"
22+ exit 1
23+ fi
24+
25+ echo " Schema is up to date."
You can’t perform that action at this time.
0 commit comments