chore: backward-compatible .manifest.xml detection [skip ci]

This commit is contained in:
2026-05-12 19:08:05 +00:00
parent 89c63f0dd0
commit 9ece74e3e9
+4 -2
View File
@@ -56,8 +56,10 @@ jobs:
id: platform
run: |
# Read platform from XML manifest (<platform> tag) or plain text fallback
PLATFORM=$(sed -n 's/.*<platform>\([^<]*\)<\/platform>.*/\1/p' .mokogitea/.moko-platform 2>/dev/null | head -1)
[ -z "$PLATFORM" ] && PLATFORM=$(cat .mokogitea/.moko-platform 2>/dev/null | tr -d '[:space:]')
MANIFEST_FILE=".mokogitea/.manifest.xml"
[ ! -f "$MANIFEST_FILE" ] && MANIFEST_FILE=".mokogitea/.moko-platform"
PLATFORM=$(sed -n 's/.*<platform>\([^<]*\)<\/platform>.*/\1/p' "$MANIFEST_FILE" 2>/dev/null | head -1)
[ -z "$PLATFORM" ] && PLATFORM=$(cat "$MANIFEST_FILE" 2>/dev/null | tr -d '[:space:]')
[ -z "$PLATFORM" ] && PLATFORM="generic"
echo "platform=$PLATFORM" >> "$GITHUB_OUTPUT"
MANIFEST=$(find . -maxdepth 3 -name "*.xml" ! -path "./.git/*" -exec grep -l '<extension' {} \; 2>/dev/null | head -1)