Skip to content

Commit 99dbc68

Browse files
committed
fix(ci): fork release reads the Linux manifest without upstream's parser
electron-builder writes blockMapSize for the AppImage in latest-linux.yml, and upstream's update manifest parser rejects that line, so the v0.1.902 publish job failed. Check the manifest version and the single AppImage entry with grep and sed instead. Verified against this release's real latest-linux.yml, plus wrong-version and two-AppImage cases. Model: Claude Opus 5.5; harness: Claude Code in T3 Code.
1 parent ddd750f commit 99dbc68

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

‎.github/workflows/fork-release.yml‎

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,12 @@ jobs:
164164
set -euo pipefail
165165
channel=latest
166166
if [[ "$PRERELEASE" == true ]]; then channel=nightly; fi
167-
appimage=$(node --input-type=module -e '
168-
import { readFileSync } from "node:fs";
169-
import { parseUpdateManifest } from "./scripts/lib/update-manifest.ts";
170-
const manifest = parseUpdateManifest(readFileSync(process.argv[1], "utf8"), process.argv[1], "Linux");
171-
if (manifest.version !== process.argv[2]) throw new Error("Linux update manifest version does not match the release");
172-
const files = manifest.files.filter(file => /^T3-Code-[^/]+\.AppImage$/.test(file.url));
173-
if (files.length !== 1) throw new Error("Expected one Linux AppImage in the update manifest");
174-
process.stdout.write(files[0].url);
175-
' "release-assets/$channel-linux.yml" "$VERSION")
167+
# Read directly: electron-builder adds keys such as blockMapSize that upstream's manifest parser rejects.
168+
linux_manifest="release-assets/$channel-linux.yml"
169+
grep -qx "version: $VERSION" "$linux_manifest" || { echo "::error::Linux update manifest is not version $VERSION"; exit 1; }
170+
mapfile -t appimages < <(sed -n 's/^ - url: \(T3-Code-[^/]*\.AppImage\)$/\1/p' "$linux_manifest")
171+
[[ ${#appimages[@]} -eq 1 ]] || { echo "::error::Expected one Linux AppImage in the update manifest"; exit 1; }
172+
appimage=${appimages[0]}
176173
for file in "$channel.yml" "$channel-mac.yml" "$channel-mac-x64.yml" "$channel-linux.yml" \
177174
"T3-Code-$VERSION-x64.exe" "T3-Code-$VERSION-x64.exe.blockmap" \
178175
"T3-Code-$VERSION-arm64.dmg" "T3-Code-$VERSION-arm64.zip" \

0 commit comments

Comments
 (0)