From e7e4877a482a43ce225da381f5f6d4a2ebd7c103 Mon Sep 17 00:00:00 2001 From: Savsis Date: Fri, 8 May 2026 03:04:46 +0500 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a7c51ef..b66fbde 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,6 +25,32 @@ jobs: npm cache clean --force npm install --legacy-peer-deps + - name: Patch react-native-track-player + run: | + TP="node_modules/react-native-track-player" + SRC="$TP/lib/src" + CJS="$TP/lib/commonjs" + echo "=== Listing package structure ===" + ls "$TP/lib/" 2>/dev/null || echo "No lib dir" + ls "$CJS/" 2>/dev/null | head -20 || echo "No commonjs dir" + mkdir -p "$SRC" + # Copy real compiled files from commonjs → src + if [ -d "$CJS" ]; then + cp -r "$CJS/." "$SRC/" + echo "=== Copied commonjs → lib/src ===" + ls "$SRC/" + else + echo "ERROR: lib/commonjs not found — cannot patch" + exit 1 + fi + # Verify the critical file exists + if [ ! -f "$SRC/trackPlayer.js" ]; then + echo "ERROR: trackPlayer.js still missing after patch" + ls "$SRC/" + exit 1 + fi + echo "PATCH OK: trackPlayer.js exists" + - name: Install CocoaPods run: sudo gem install cocoapods --no-document