All checks were successful
PR Check — Frontend / frontend (pull_request) Successful in 2m4s
Follow-ups of the review of PR #418. - check-latest-json.jq wants exactly one document and release.yml calls it with -s: under jq 1.6, the release container's, an empty file passed the check (no output, status 0) and two documents were judged on the last one, so the job would have deleted the published manifest and uploaded the bad one. Two tests cover both cases. - build-latest-json.test.mjs runs the text of release.yml's "Publish latest.json to package registry" step against a fake curl: DELETE then PUT on a valid manifest, exit 1 and no request on a refused one. - check-frontend no longer ignores .claude/** and release.yml (decision of Max): the test reads verify-release.sh and runs the Publish step, so "on every pull request" holds. REVIEW.md, CLAUDE.md and architecture.md follow. - release.yml: stale ".deb fallback" comment fixed. - qa-update-cycle.md: a tauri dev build on Linux shows TargetsNotFound, expected since #418. Refs #461 Resolves #419 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
1.9 KiB
Text
34 lines
1.9 KiB
Text
# Check of latest.json, the updater manifest, before release.yml deletes the
|
|
# published one from the package registry (#320). Once that version is
|
|
# deleted, installed apps find no update until a valid one is uploaded, so a
|
|
# manifest that fails this check stops the job and leaves the registry as is.
|
|
#
|
|
# Run as: jq -e -s --arg version <X.Y.Z> -f scripts/check-latest-json.jq latest.json
|
|
# -e turns false, null and any jq error (missing field, wrong type, invalid
|
|
# JSON) into a non-zero exit status: the check fails closed.
|
|
# -s reads the whole file as one array of documents, and the filter wants
|
|
# exactly one (#419). Without it, jq 1.6 runs the filter once per document: an
|
|
# empty file gives no output, which -e lets through with status 0, and two
|
|
# documents are judged on the last one alone. jq 1.7 refuses the empty file
|
|
# (status 4) but still passes the two documents.
|
|
#
|
|
# The key set must stay the one scripts/build-latest-json.sh writes and
|
|
# .claude/skills/release/scripts/verify-release.sh expects.
|
|
# scripts/build-latest-json.test.mjs runs this file on the script's output and
|
|
# on broken manifests, and compares the three lists, on every pull request
|
|
# through check-frontend: a misaligned list shows before the tag, not at it.
|
|
# It also runs the text of release.yml's Publish step, which calls this file.
|
|
# Written for jq 1.6, the version ubuntu:22.04 ships.
|
|
#
|
|
# Not checked here: that each signature belongs to its own file. The script's
|
|
# test checks it before the merge, and verify-release.sh after publication
|
|
# (the file: field of the minisign trusted comment).
|
|
|
|
length == 1
|
|
and (.[0]
|
|
| .version == $version
|
|
and (.platforms | keys) == ["linux-x86_64-deb", "linux-x86_64-rpm", "windows-x86_64"]
|
|
and all(.platforms[]; (.signature | type) == "string" and (.signature | length) > 0)
|
|
and (.platforms["linux-x86_64-deb"].url | endswith(".deb"))
|
|
and (.platforms["linux-x86_64-rpm"].url | endswith(".rpm"))
|
|
and (.platforms["windows-x86_64"].url | endswith(".exe")))
|