Skip to content

Commit 497decd

Browse files
committed
Fix validation
1 parent 2e9de77 commit 497decd

2 files changed

Lines changed: 55 additions & 37 deletions

File tree

.github/workflows/framework-app-store-validation.yml

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,19 @@ jobs:
9797
fi
9898
done
9999
100+
local info_current="$framework_dir/Versions/Current/Resources/Info.plist"
101+
local info_symlink="$framework_dir/Resources/Info.plist"
102+
if [ ! -f "$info_current" ]; then
103+
echo " ❌ Info.plist missing at Versions/Current/Resources/Info.plist"
104+
errors=$((errors + 1))
105+
else
106+
echo " ✓ Info.plist located at Versions/Current/Resources/Info.plist"
107+
fi
108+
if [ ! -f "$info_symlink" ]; then
109+
echo " ❌ Resources/Info.plist symlink missing"
110+
errors=$((errors + 1))
111+
fi
112+
100113
if [ $errors -gt 0 ]; then
101114
return 1
102115
fi
@@ -133,21 +146,21 @@ jobs:
133146
134147
FRAMEWORK_PATH="Sources/FluidAudio/Frameworks/ESpeakNG.xcframework"
135148
136-
# For versioned frameworks (macOS), check that resources are properly accessible
137-
for framework_dir in "$FRAMEWORK_PATH"/**/ESpeakNG.framework; do
138-
if [ -d "$framework_dir/Resources" ]; then
139-
# Check if Resources is a symlink
140-
if [ -L "$framework_dir/Resources" ]; then
141-
echo "✓ Resources is properly symlinked"
142-
143-
# Verify the symlink resolves
144-
if [ -d "$framework_dir/Resources" ]; then
145-
resource_count=$(find "$framework_dir/Resources" -type f | wc -l)
146-
echo " Found $resource_count resource files"
147-
fi
148-
fi
149+
found_resources=false
150+
while IFS= read -r -d '' framework_dir; do
151+
found_resources=true
152+
if [ -L "$framework_dir/Resources" ]; then
153+
echo "✓ $(basename "$framework_dir") Resources symlink resolves"
154+
resource_count=$(find "$framework_dir/Resources" -type f | wc -l | tr -d '[:space:]')
155+
echo " Found $resource_count resource files"
156+
elif [ -d "$framework_dir/Resources" ]; then
157+
echo "⚠️ $(basename "$framework_dir") has a real Resources directory (expected symlink for versioned frameworks)"
149158
fi
150-
done
159+
done < <(find "$FRAMEWORK_PATH" -type d -name "ESpeakNG.framework" -print0)
160+
161+
if [ "$found_resources" = false ]; then
162+
echo "⚠️ No ESpeakNG.framework directories found when validating resources"
163+
fi
151164
152165
echo "✅ Resources validation complete"
153166

.github/workflows/framework-validation.yml

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -180,32 +180,37 @@ jobs:
180180
echo "🔎 Checking for common framework structure issues..."
181181
echo ""
182182
183-
# Check for case sensitivity issues in binary names
184-
for framework in "$FRAMEWORK_PATH"/**/ESpeakNG.framework/Versions/A; do
185-
if [ -d "$framework" ]; then
186-
# Use ls with grep to check for exact case typo on case-insensitive filesystems
187-
if ! ls "$framework" 2>/dev/null | grep -x "ESpeakNG" > /dev/null; then
188-
echo "❌ ERROR: Binary 'ESpeakNG' not found with correct casing"
189-
echo " This would cause dyld errors at runtime"
190-
exit 1
191-
fi
183+
echo "🔠 Verifying binary casing inside versioned frameworks..."
184+
found_versioned=false
185+
while IFS= read -r -d '' version_dir; do
186+
found_versioned=true
187+
actual_name=$(python3 -c 'import os, sys; path=sys.argv[1]; target="espeakng"; print(next((n for n in os.listdir(path) if n.lower()==target), ""))' "$version_dir")
188+
if [ -z "$actual_name" ]; then
189+
echo "❌ ERROR: No ESpeakNG binary found inside $version_dir"
190+
exit 1
192191
fi
193-
done
192+
if [ "$actual_name" != "ESpeakNG" ]; then
193+
echo "❌ ERROR: Binary '$actual_name' found in $version_dir (expected ESpeakNG)"
194+
echo " This would cause dyld errors on case-sensitive filesystems"
195+
exit 1
196+
fi
197+
done < <(find "$FRAMEWORK_PATH" -type d -path "*/ESpeakNG.framework/Versions/A" -print0)
194198
195-
echo "✅ No case sensitivity issues found"
196-
echo ""
199+
if [ "$found_versioned" = false ]; then
200+
echo " ⚠️ No versioned frameworks found to inspect"
201+
else
202+
echo " ✓ Binary casing validated in versioned slices"
203+
fi
197204
198-
# Check for broken symlinks
205+
echo ""
199206
echo "🔗 Checking for broken symlinks..."
200-
for framework in "$FRAMEWORK_PATH"/**/ESpeakNG.framework; do
201-
if [ -d "$framework" ]; then
202-
while IFS= read -r -d '' link; do
203-
if [ -L "$link" ] && ! [ -e "$link" ]; then
204-
echo "❌ ERROR: Broken symlink: $(basename $link)"
205-
exit 1
206-
fi
207-
done < <(find "$framework" -type l -print0)
208-
fi
209-
done
207+
while IFS= read -r -d '' framework; do
208+
while IFS= read -r -d '' link; do
209+
if [ -L "$link" ] && ! [ -e "$link" ]; then
210+
echo "❌ ERROR: Broken symlink: $(basename "$link")"
211+
exit 1
212+
fi
213+
done < <(find "$framework" -type l -print0)
214+
done < <(find "$FRAMEWORK_PATH" -type d -name "ESpeakNG.framework" -print0)
210215
211216
echo "✅ All symlinks are valid"

0 commit comments

Comments
 (0)