MohGovIL / hamagen-react-native

Israel's Ministry of Health's COVID-19 Exposure Prevention App
https://health.gov.il/
MIT License
508 stars 153 forks source link

Avoid `cd ios && pod install && cd ../` call when building APK #244

Closed emanuelb closed 4 years ago

emanuelb commented 4 years ago

Currently running yarn install or npm install will probably fail on linux machine due to missing pod command:

$ cd ios && pod install && cd ../ && npx jetify                                                                              
/bin/sh: pod: not found
error Command failed with exit code 127.                                                                                     
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.               

due to pod install call at: https://github.com/MohGovIL/hamagen-react-native/blob/a5e1d4db92fa2d197727f26f1f4ec37f40d3d0ea/package.json#L5-L6

The user may look into how to install this dep (cocoapods) on linux by: Debian apt-get update; apt-get install -y --no-install-recommends ruby ruby-dev make gcc libcurl4 libc6-dev git; gem install cocoapods

but it's not needed when building APK (only when building IPA for IOS which require running on macosx)

fix:

kaplanlior commented 4 years ago

At the moment it's there as the development team is working on Mac.

But this issue is correct and we should wrap that command with a script to make sure it runs only on Mac.

emanuelb commented 4 years ago

we should wrap that command with a script to make sure it runs only on Mac.

No, it should run only when building ipa (ios app). it's more then useless (harmful) to run it when building apk (require more deps installed which decrease build-system security, wasted cpu cycles & bandwidth for nothing, etc...)