Update main.yml
This commit is contained in:
parent
5dce50fe9f
commit
9d4e0a72b7
1 changed files with 7 additions and 17 deletions
24
.github/workflows/main.yml
vendored
24
.github/workflows/main.yml
vendored
|
|
@ -18,27 +18,17 @@ jobs:
|
||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
|
|
||||||
- name: Clean and Install
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
rm -rf node_modules package-lock.json
|
|
||||||
npm install --legacy-peer-deps
|
npm install --legacy-peer-deps
|
||||||
npm install react-native-svg --legacy-peer-deps
|
npm install react-native-svg --legacy-peer-deps
|
||||||
|
|
||||||
- name: Patch Track Player (Config Plugin Fix)
|
- name: Remove broken Config Plugin
|
||||||
run: |
|
run: |
|
||||||
# Фиксим основной вход плагина, если он есть
|
# Вырезаем плагин из app.json или app.config.json, чтобы Expo не пытался его загрузить
|
||||||
PLUGIN_PATH="node_modules/react-native-track-player/app.plugin.js"
|
if [ -f "app.json" ]; then
|
||||||
if [ -f "$PLUGIN_PATH" ]; then
|
cat app.json | jq 'del(.expo.plugins[] | select(. == "react-native-track-player" or .[0] == "react-native-track-player"))' > app.json.tmp && mv app.json.tmp app.json
|
||||||
echo "Patching Config Plugin..."
|
echo "Removed react-native-track-player from app.json plugins"
|
||||||
# Заменяем импорты на реквайры, чтобы Node не ныла
|
|
||||||
sed -i '' "s/import/const/g" "$PLUGIN_PATH" || true
|
|
||||||
sed -i '' "s/export default/module.exports =/g" "$PLUGIN_PATH" || true
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Фиксим index.js, который вызывал ошибку ранее
|
|
||||||
INDEX_PATH="node_modules/react-native-track-player/lib/src/index.js"
|
|
||||||
if [ -f "$INDEX_PATH" ]; then
|
|
||||||
sed -i '' "s/from '.\/trackPlayer'/from '.\/trackPlayer.js'/g" "$INDEX_PATH" || true
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Fix Git state
|
- name: Fix Git state
|
||||||
|
|
@ -46,7 +36,7 @@ jobs:
|
||||||
git config --global user.email "bot@example.com"
|
git config --global user.email "bot@example.com"
|
||||||
git config --global user.name "Builder Bot"
|
git config --global user.name "Builder Bot"
|
||||||
git add .
|
git add .
|
||||||
git commit -m "ci: fix plugins" || true
|
git commit -m "ci: remove broken plugin" || true
|
||||||
|
|
||||||
- name: Expo prebuild
|
- name: Expo prebuild
|
||||||
run: npx expo prebuild --platform ios --clean --no-install
|
run: npx expo prebuild --platform ios --clean --no-install
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue