Commit ef2fbb2b85
Verified · cmc ci/daily-pull: failure
Layout: unified · split
.gitbay/ci.yml +20
| @@ -86,6 +86,26 @@ jobs: | ||
| 86 | 86 | ssh $HOST release asset add $R archive metro.db.gz < metro.db.gz |
| 87 | 87 | ssh $HOST release asset remove $R archive metro.db.new.gz 2>/dev/null || true |
| 88 | 88 | rm metro.db.gz |
| 89 | { | |
| 90 | echo "SQLite archive of Omaha metro police incident feeds, rebuilt twice daily." | |
| 91 | echo "Sarpy County and Council Bluffs publish a rolling 12-month window," | |
| 92 | echo "so this holds records their own feeds no longer serve." | |
| 93 | echo | |
| 94 | echo "Updated $(date -u '+%Y-%m-%d %H:%M UTC'). Schema: schema.sql." | |
| 95 | echo | |
| 96 | echo "incidents holds each record as first published; every later" | |
| 97 | echo "version the feed served is a row in incident_amendments" | |
| 98 | echo "($(sqlite3 -noheader "$DB" 'SELECT COUNT(*) FROM incident_amendments') so far)." | |
| 99 | echo | |
| 100 | echo '```' | |
| 101 | sqlite3 -header -column "$DB" \ | |
| 102 | "SELECT agency, COUNT(*) AS rows, SUM(is_stop) AS stops, | |
| 103 | MIN(occurred_at) AS earliest, MAX(occurred_at) AS latest | |
| 104 | FROM incidents GROUP BY agency ORDER BY rows DESC" | |
| 105 | echo '```' | |
| 106 | } > notes.md | |
| 107 | ssh $HOST "release edit $R archive --title 'Incident archive' --file -" < notes.md | |
| 108 | rm notes.md | |
| 89 | 109 | echo "archive published" |
| 90 | 110 | - | |
| 91 | 111 | set -e |