fix: Improve error handling in mobile app build process
This commit is contained in:
34
.github/workflows/mobile-ci.yml
vendored
34
.github/workflows/mobile-ci.yml
vendored
@@ -89,36 +89,30 @@ jobs:
|
|||||||
- name: 🔨 Run compilation check
|
- name: 🔨 Run compilation check
|
||||||
run: |
|
run: |
|
||||||
echo "🏗️ Building client app for Android (dev mode)..."
|
echo "🏗️ Building client app for Android (dev mode)..."
|
||||||
make mobile-client-build PLATFORM=apk MODE=debug 2>&1 | tee client_build.txt || true
|
if ! make mobile-client-build PLATFORM=apk MODE=debug 2>&1 | tee client_build.txt; then
|
||||||
|
echo ""
|
||||||
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
|
echo "❌ CLIENT APP BUILD FAILED"
|
||||||
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
|
|
||||||
echo "🏗️ Building staff app for Android (dev mode)..."
|
echo "🏗️ Building staff app for Android (dev mode)..."
|
||||||
make mobile-staff-build PLATFORM=apk MODE=debug 2>&1 | tee staff_build.txt || true
|
if ! make mobile-staff-build PLATFORM=apk MODE=debug 2>&1 | tee staff_build.txt; then
|
||||||
|
echo ""
|
||||||
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
|
echo "❌ STAFF APP BUILD FAILED"
|
||||||
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
|
|
||||||
# Check for actual errors in both builds
|
|
||||||
if grep -E "^\s*(error|SEVERE|Error|failed)" client_build.txt > /dev/null 2>&1 || \
|
|
||||||
grep -E "^\s*(error|SEVERE|Error|failed)" staff_build.txt > /dev/null 2>&1; then
|
|
||||||
echo "❌ BUILD ERRORS FOUND:"
|
|
||||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
||||||
if grep -E "^\s*(error|SEVERE|Error|failed)" client_build.txt > /dev/null 2>&1; then
|
|
||||||
echo " CLIENT BUILD:"
|
|
||||||
grep -B 2 -A 1 -E "^\s*(error|SEVERE|Error|failed)" client_build.txt | sed 's/^/ /'
|
|
||||||
fi
|
|
||||||
if grep -E "^\s*(error|SEVERE|Error|failed)" staff_build.txt > /dev/null 2>&1; then
|
|
||||||
echo " STAFF BUILD:"
|
|
||||||
grep -B 2 -A 1 -E "^\s*(error|SEVERE|Error|failed)" staff_build.txt | sed 's/^/ /'
|
|
||||||
fi
|
|
||||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "✅ Build check PASSED - Both apps built successfully"
|
echo "✅ Build check PASSED - Both apps built successfully"
|
||||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||||
fi
|
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
name: 🧹 Lint Changed Files
|
name: 🧹 Lint Changed Files
|
||||||
|
|||||||
Reference in New Issue
Block a user