Skip to content

Commit 723058f

Browse files
committed
fix(updates): Fix development appcast generation to properly extract dev items
**Problem:** - Users with development updates enabled could not see dev releases - The generate-dev-appcast.sh script failed to extract items from appcast-dev-items.xml - Result: appcast-dev.xml only contained stable releases, no dev builds **Root Cause:** The awk script in generate-dev-appcast.sh had a logic error: - Used 'next' which skipped entire lines when comment markers found - Failed to properly track multi-line comment state - Items inside appcast-dev-items.xml were never extracted **Solution:** Rewrote the awk script to: - Properly handle multi-line XML comments - Track comment state across lines without skipping - Extract <item> blocks that are NOT inside comments - Successfully merge dev items with stable releases **Testing:** ✅ Script now extracts 20260112.1-dev.1 an✅ Script now extracts 20260112.1-dev.1 an✅ Script now extracts 20260112.1-dev.1 an✅ Script now extracts 20260112.1-dev.1 an✅ Script now extractsApp✅ Script s ✅ Script now extracts 20260112.1-dev.1 an✅ Script now extractsUs✅ Script now extracts 20260112.1-dev.1 an✅ Script now extracts 20260v builds. Fixes all past dev releases that were missing from the appcast.
1 parent e27af81 commit 723058f

2 files changed

Lines changed: 78 additions & 5 deletions

File tree

appcast-dev.xml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,60 @@
77
<language>en</language>
88

99
<!-- Development releases (from appcast-dev-items.xml) -->
10+
<item>
11+
<title>SAM 20260112.1-dev.1</title>
12+
<description><![CDATA[
13+
<h2>SAM 20260112.1-dev.1 (Development Build)</h2>
14+
<p><strong>⚠️ This is a DEVELOPMENT release for testing purposes.</strong></p>
15+
<h3>What's New:</h3>
16+
<ul>
17+
<li>See <a href="https://github.com/SyntheticAutonomicMind/SAM/releases/tag/20260112.1-dev.1">GitHub Releases</a> for details</li>
18+
</ul>
19+
<h3>Known Issues:</h3>
20+
<ul>
21+
<li>Development builds may contain bugs and incomplete features</li>
22+
</ul>
23+
]]></description>
24+
<pubDate>Tue, 13 Jan 2026 04:10:06 +0000</pubDate>
25+
<sparkle:releaseNotesLink>https://github.com/SyntheticAutonomicMind/SAM/releases/tag/20260112.1-dev.1</sparkle:releaseNotesLink>
26+
<sparkle:channel>development</sparkle:channel>
27+
<enclosure
28+
url="https://github.com/SyntheticAutonomicMind/SAM/releases/download/20260112.1-dev.1/SAM-20260112.1-dev.1.zip"
29+
sparkle:version="20260112.1-dev.1"
30+
sparkle:shortVersionString="20260112.1-dev.1"
31+
sparkle:edSignature="aakIGuO+kNmBiiZOw9C40L75SifunucsDQsw88lFc3YtO9kdJQ5epUZOU78rf3kXebvSQ6UDvvtn55/wnBE2Bw=="
32+
length="772381192"
33+
type="application/octet-stream"
34+
/>
35+
<sparkle:minimumSystemVersion>14.0</sparkle:minimumSystemVersion>
36+
</item>
37+
<item>
38+
<title>SAM 20260111.1-dev.1</title>
39+
<description><![CDATA[
40+
<h2>SAM 20260111.1-dev.1 (Development Build)</h2>
41+
<p><strong>⚠️ This is a DEVELOPMENT release for testing purposes.</strong></p>
42+
<h3>What's New:</h3>
43+
<ul>
44+
<li>See <a href="https://github.com/SyntheticAutonomicMind/SAM/releases/tag/20260111.1-dev.1">GitHub Releases</a> for details</li>
45+
</ul>
46+
<h3>Known Issues:</h3>
47+
<ul>
48+
<li>Development builds may contain bugs and incomplete features</li>
49+
</ul>
50+
]]></description>
51+
<pubDate>Mon, 12 Jan 2026 04:34:52 +0000</pubDate>
52+
<sparkle:releaseNotesLink>https://github.com/SyntheticAutonomicMind/SAM/releases/tag/20260111.1-dev.1</sparkle:releaseNotesLink>
53+
<sparkle:channel>development</sparkle:channel>
54+
<enclosure
55+
url="https://github.com/SyntheticAutonomicMind/SAM/releases/download/20260111.1-dev.1/SAM-20260111.1-dev.1.zip"
56+
sparkle:version="20260111.1-dev.1"
57+
sparkle:shortVersionString="20260111.1-dev.1"
58+
sparkle:edSignature="H6vssLL6EqvfGv+IRr8xF2b2fSHhyEZMaUV1q0Tau14NFXsXYA2dlBEn2fqfY6SNYB4rIfBuuU9GuoZExcBvAA=="
59+
length="770511917"
60+
type="application/octet-stream"
61+
/>
62+
<sparkle:minimumSystemVersion>14.0</sparkle:minimumSystemVersion>
63+
</item>
1064

1165
<!-- Stable releases (fallback from appcast.xml) -->
1266
<item>

scripts/generate-dev-appcast.sh

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,30 @@ EOF
3838
# Use awk to properly handle multi-line comments
3939
DEV_ITEMS_CONTENT=$(awk '
4040
BEGIN { in_comment = 0; in_item = 0 }
41-
/<!--/ { in_comment = 1; next }
42-
/-->/ { in_comment = 0; next }
43-
!in_comment && /<item>/ { in_item = 1 }
44-
!in_comment && in_item { print }
45-
!in_comment && /<\/item>/ { in_item = 0 }
41+
{
42+
# Check for comment start
43+
if (match($0, /<!--/)) {
44+
in_comment = 1
45+
}
46+
47+
# If not in comment, check for item tags
48+
if (!in_comment) {
49+
if (match($0, /<item>/)) {
50+
in_item = 1
51+
}
52+
if (in_item) {
53+
print $0
54+
}
55+
if (match($0, /<\/item>/)) {
56+
in_item = 0
57+
}
58+
}
59+
60+
# Check for comment end
61+
if (match($0, /-->/)) {
62+
in_comment = 0
63+
}
64+
}
4665
' "$DEV_ITEMS")
4766

4867
if [ -n "$DEV_ITEMS_CONTENT" ]; then

0 commit comments

Comments
 (0)