feat: use manifest_read.php for platform detection [skip ci]

This commit is contained in:
2026-05-12 19:24:19 +00:00
parent 17b09fca27
commit e4a5f56ca8
+4 -5
View File
@@ -55,11 +55,10 @@ jobs:
- name: Detect platform
id: platform
run: |
# Read platform from XML manifest (<platform> tag) or plain text fallback
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:]')
# Parse .manifest.xml via manifest_read.php
php /tmp/mokostandards-api/cli/manifest_read.php --path . --github-output 2>/dev/null || true
PLATFORM=$(php /tmp/mokostandards-api/cli/manifest_read.php --path . --field platform 2>/dev/null)
[ -z "$PLATFORM" ] && PLATFORM=$(cat ".mokogitea/.manifest.xml" 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)