Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated to build assets folder if its not there and run the build rel… #297

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,21 @@ jobs:
- name: Make Gradlew Executable
run: cd android && chmod +x ./gradlew

- name: build release
run: npx react-native bundle --platform android --dev false --entry-file index.js --assets-dest cd android/app/src/main && mkdir assets --bundle-output index.android.bundle && cd android && ./gradlew assembleDebug
- name: Build assets folder
run: |
cd android/app/src/main &&
if [ -d "assets" ]; then
rm -r assets
fi

- name: Build release
run: |
mkdir -p android/app/src/main/assets &&
npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res &&
cd android &&
./gradlew assembleDebug
- name: list files
run: ls -lrt android/app/build/outputs/apk/debug
run: ls -lrt android/app/build/outputs/apk/release

- name: upload artifact to Firebase App Distribution
uses: wzieba/[email protected]
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"format-check": "prettier --check ./src",
"format-fix": "prettier --write ./src",
"precommit-check": "yarn run format-fix && yarn run lint",
"build": "npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res; cd android ; ./gradlew assembleDebug"
"build-assets-folder": "cd android/app/src/main && if [ -d 'assets' ]; then rm -r assets; fi",
"build": "mkdir -p android/app/src/main/assets && npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res && cd android && ./gradlew assembleDebug"
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.15.16",
Expand Down