diff --git a/CHANGELOG.md b/CHANGELOG.md index a86f4e7..4875f87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,24 @@ Notable changes, newest first. Dates are the day the work landed on `main`. The versions are what a release is tagged as; between tags, `main` is what is being used daily. +## Unreleased + +### Fixed + +- **The update dialog says what changed.** It announced that a new version was available and then + showed an empty page, so the only way to find out what you were about to install was to go and + look the changelog up yourself — and pressing Install without knowing is what people actually + did. The feed now carries that version's own changelog section, set to be read in the small + window it appears in and following the Mac's light or dark appearance. A release whose version + has nothing written about it in the changelog is now refused, rather than published with an + empty page to show. + +### Changed + +- **The self-check writes English names.** Running it created a skill called `auto-teste` and a + command called `auto-comando`, described in Portuguese, on the disk of whoever ran it. They are + now `self-check-skill` and `self-check-command`. + ## 0.3.3 — 2026-08-28 ### Changed diff --git a/Scripts/appcast.sh b/Scripts/appcast.sh index 83563cd..49d1018 100755 --- a/Scripts/appcast.sh +++ b/Scripts/appcast.sh @@ -56,11 +56,110 @@ STAGE="$(mktemp -d)" trap 'rm -rf "$STAGE"' EXIT ditto "$DMG" "$STAGE/$(basename "$UPDATE_DMG")" +# Sparkle's dialog says only that a new version is available unless the feed carries a description +# of its own, and the tooling has exactly one way to be given one: a file beside the archive in the +# directory it scans, named after that archive — Loadout--update.html next to +# Loadout--update.dmg. HTML with no DOCTYPE or body tags is embedded in the feed rather +# than linked, which is what the dialog needs, because at that moment it is being read by somebody +# deciding whether to press Install and it cannot go and fetch anything. +NOTES="$STAGE/$(basename "${UPDATE_DMG%.dmg}").html" + +# This version's section and no other: from its own '## ' heading to the next one. A +# dialog describing the previous release's work is worse than one describing none, because it is +# believed. +SECTION="$(awk -v v="$VERSION" ' + $1 == "##" && $2 == v { inside = 1; next } + $1 == "##" && inside { exit } + inside { print } +' "$ROOT/CHANGELOG.md")" + +[ -n "$(printf '%s' "$SECTION" | tr -d '[:space:]')" ] || { + echo "error: CHANGELOG.md has nothing under '## $VERSION' — the update dialog would announce" >&2 + echo " this version and then show the reader nothing about it" >&2 + exit 1 +} + +# Only what this changelog actually writes: '### Fixed'-style subheadings, '- ' bullets whose text +# wraps across lines and sometimes carries a second paragraph, **bold**, `code` and [text](url). +# Every line is escaped on the way in — one stray & or < in a release note would make the signed +# feed invalid XML, and installed copies would reject the whole thing rather than one item. +# +# Colours are left to the reader's system: Sparkle draws this in a small web view that follows dark +# mode, so a hardcoded black on white becomes unreadable the moment the Mac is dark. 'color-scheme' +# tells WebKit to pick both, and the one tint used here is a grey that works either way. +{ + cat <<-'CSS' + + CSS + + printf '%s\n' "$SECTION" | awk ' + function esc(s) { + gsub(/&/, "\\&", s); gsub(//, "\\>", s) + return s + } + function add(t) { buf = (buf == "" ? t : buf " " t) } + function para() { if (buf != "") { print "

" buf "

"; buf = "" } } + function item() { para(); if (li) { print ""; li = 0 } } + function list() { item(); if (ul) { print ""; ul = 0 } } + + /^### / { list(); print "

" esc(substr($0, 5)) "

"; next } + /^- / { item(); if (!ul) { print "