diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 6b9c942..73fd3d4 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -23,6 +23,34 @@ jobs:
npm install --legacy-peer-deps --ignore-scripts
npm install react-native-svg expo-updates --legacy-peer-deps --ignore-scripts
+ - name: Force Fix JSX Syntax (Player.tsx)
+ run: |
+ # Используем Python для более умной замены, чтобы не плодить вложенные фрагменты
+ python3 -c "
+ import os
+ path = 'components/Player.tsx'
+ if os.path.exists(path):
+ with open(path, 'r') as f:
+ content = f.read()
+
+ # Убираем возможные кривые фрагменты из прошлого билда
+ content = content.replace('<>>', '')
+
+ # Находим блок с таймингами и оборачиваем его ОДИН РАЗ
+ old_block = '{fmt(progress)}\n {fmt(duration)}'
+ new_block = '<>\n {fmt(progress)}\n {fmt(duration)}\n >'
+
+ if old_block in content:
+ content = content.replace(old_block, new_block)
+ else:
+ # Запасной вариант, если отступы другие
+ content = content.replace('{fmt(progress)}', '{fmt(progress)}').replace('{fmt(progress)}', '<>{fmt(progress)}')
+ content = content.replace('{fmt(duration)}', '{fmt(duration)}>')
+
+ with open(path, 'w') as f:
+ f.write(content)
+ "
+
- name: Prepare app.json
run: |
cat << 'EOF' > app.json
@@ -54,18 +82,6 @@ jobs:
};
EOF
- - name: Patch Player Syntax
- run: |
- node -e "
- const fs = require('fs');
- const p = 'components/Player.tsx';
- if (fs.existsSync(p)) {
- let c = fs.readFileSync(p, 'utf8');
- c = c.replace(/]*>\{fmt\(progress\)\}<\/Text>\s*]*>\{fmt\(duration\)\}<\/Text>/, m => '<>' + m + '>');
- fs.writeFileSync(p, c, 'utf8');
- }
- "
-
- name: Expo prebuild
run: npx expo prebuild --platform ios --clean --no-install
@@ -86,7 +102,6 @@ jobs:
run: |
WORKSPACE_PATH=$(find ios -maxdepth 1 -name "*.xcworkspace" | head -1)
SCHEME_NAME=$(basename "$WORKSPACE_PATH" .xcworkspace)
-
export NODE_BINARY=$(which node)
xcodebuild build \