Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions scripts/fixtures/release/prior-1-nonl.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Hidden Bar</title>
<link>https://github.com/dwarvesf/hidden</link>
<description>Hidden Bar updates</description>
<language>en</language>
<item>
<title>Version 1.11.2</title>
<pubDate>Sun, 15 Nov 2026 06:50:21 GMT</pubDate>
<sparkle:version>17</sparkle:version>
<sparkle:shortVersionString>1.11.2</sparkle:shortVersionString>
<sparkle:minimumSystemVersion>13.0</sparkle:minimumSystemVersion>
<sparkle:fullReleaseNotesLink>https://github.com/dwarvesf/hidden/releases/tag/v1.11.2</sparkle:fullReleaseNotesLink>
<description><![CDATA[
<ul>
<li>macOS 27: clicking the clock opens Notification Center again.</li>
<li>Icons you keep right of the arrow stay visible.</li>
<li>Microphone and camera indicators are no longer hidden.</li>
<li>Multi-display fixes, auto-update, and Turkish, Ukrainian and Italian translations.</li>
</ul>
]]></description>
<enclosure url="https://github.com/dwarvesf/hidden/releases/download/v1.11.2/Hidden-Bar-v1.11.2-macos.zip" length="2026759" type="application/octet-stream" sparkle:edSignature="qAsECvbmtEMdTEWB3C8crQ3PZy4JhXBRbEfZjgZ3rYmzYP+WKIJJXoH6PxsYag7/J+yKZH79EuU5mlNfe6zTBQ=="/>
</item>
</channel>
</rss>
5 changes: 4 additions & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,11 @@ readback_new_item() { # appcast build short min-os url length : rc 1 and the mis
}

cut_cmp_prior() { # new-appcast prior-appcast scratch : the new feed minus its first item is byte-identical to the prior
# awk ends its output with a newline, so the prior side gets one too when its last byte is
# not one (the published 1.13.0 feed has none); every other byte still has to match
awk 's==0 && $0==" <item>"{s=1; next} s==1{ if ($0==" </item>") s=2; next } {print}' "$1" > "$3"
cmp -s "$3" "$2"
{ cat "$2"; [ -z "$(tail -c 1 "$2")" ] || printf '\n'; } > "$3.prior"
cmp -s "$3" "$3.prior"
}

count_items() { grep -cxF ' <item>' "$1"; }
Expand Down
11 changes: 11 additions & 0 deletions scripts/test-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,17 @@ altered_prior() {
! cmp -s "$WORK/feed-alt.xml" "$WORK/feed-1.xml" && ! cut_cmp_prior "$WORK/feed-alt.xml" "$F/prior-1.xml" "$WORK/cut4"
}
t cut-cmp-detects-altered-prior altered_prior
prior_no_final_newline() { # a published feed with no newline after </rss> (as v1.13.0's) still compares equal
[ -n "$(tail -c 1 "$F/prior-1-nonl.xml")" ] &&
"$H" appcast --prior "$F/prior-1-nonl.xml" --item "$WORK/item-19.xml" --out "$WORK/feed-nonl.xml" &&
[ "$(count_items "$WORK/feed-nonl.xml")" = 2 ] && cut_cmp_prior "$WORK/feed-nonl.xml" "$F/prior-1-nonl.xml" "$WORK/cut5"
}
t cut-cmp-prior-no-final-newline prior_no_final_newline
altered_prior_no_final_newline() { # the newline allowance never hides a real byte change
sed 's|<pubDate>Sun, 15 Nov 2026 06:50:21 GMT|<pubDate>Sun, 15 Nov 2026 06:50:22 GMT|' "$WORK/feed-nonl.xml" > "$WORK/feed-nonl-alt.xml"
! cmp -s "$WORK/feed-nonl-alt.xml" "$WORK/feed-nonl.xml" && ! cut_cmp_prior "$WORK/feed-nonl-alt.xml" "$F/prior-1-nonl.xml" "$WORK/cut6"
}
t cut-cmp-no-final-newline-detects-altered altered_prior_no_final_newline

# ---- app checks on throwaway ad-hoc bundles --------------------------------------------

Expand Down