diff --git a/cli/updates_xml_build.php b/cli/updates_xml_build.php index bbeb53d..7d42617 100644 --- a/cli/updates_xml_build.php +++ b/cli/updates_xml_build.php @@ -290,31 +290,30 @@ $allChannels = ['development', 'alpha', 'beta', 'rc', 'stable']; $stabilityIndex = array_search($stability === 'development' ? 'development' : $stability, $allChannels); if ($stabilityIndex === false) $stabilityIndex = 4; // default to stable -// Write entries for this stability and all below it +// Write only the current channel entry (not cascade) +// Each channel release only creates its own entry; preserved entries handle other channels $entries = []; -for ($i = 0; $i <= $stabilityIndex; $i++) { - $channelName = $allChannels[$i]; - $channelSuffix = $stabilitySuffixMap[$channelName] ?? ''; - $channelVersion = $version . $channelSuffix; - $channelTag = $stabilityTagMap[$channelName] ?? $channelName; - $channelDownloadUrl = "{$giteaUrl}/{$org}/{$repo}/releases/download/{$channelTag}/{$typePrefix}{$extElement}-{$channelVersion}.zip"; - $channelInfoUrl = "{$giteaUrl}/{$org}/{$repo}/releases/tag/{$channelTag}"; +$channelName = $allChannels[$stabilityIndex]; +$channelSuffix = $stabilitySuffixMap[$channelName] ?? ''; +$channelVersion = $version . $channelSuffix; +$channelTag = $stabilityTagMap[$channelName] ?? $channelName; +$channelDownloadUrl = "{$giteaUrl}/{$org}/{$repo}/releases/download/{$channelTag}/{$typePrefix}{$extElement}-{$channelVersion}.zip"; +$channelInfoUrl = "{$giteaUrl}/{$org}/{$repo}/releases/tag/{$channelTag}"; - $entries[] = buildEntry( - $channelName, - $channelVersion, - $channelDownloadUrl, - $extName, - $extElement, - $extType, - $clientTag, - $folderTag, - $channelInfoUrl, - $targetPlatform, - $phpTag, - $shaTag - ); -} +$entries[] = buildEntry( + $channelName, + $channelVersion, + $channelDownloadUrl, + $extName, + $extElement, + $extType, + $clientTag, + $folderTag, + $channelInfoUrl, + $targetPlatform, + $phpTag, + $shaTag +); // -- Preserve existing entries for channels not being updated ----------------- $dest = $outputFile ?? "{$root}/updates.xml";