mirror of
https://github.com/status-im/status-react.git
synced 2025-01-10 11:06:25 +00:00
107f263fb1
fixes #18888 ## Summary `make run-android` was sometimes flaky because we used to send metro to background via `nohup` and then bring it back to foreground after we read metro logs. Now we do not send metro to background. We first wait for a successful build. we then install the app on the simulator. After this is done we give command to sleep until metro server has started, Once metro server has started we open the installed app. In this workflow the command to open the installed app goes in background and metro stays in foreground. The new workflow should now be less flaky. ## Review notes `make run-clojure` `make run-android` OR `make run-ios` should just work #### Platforms - Android - iOS
15 lines
237 B
Bash
Executable File
15 lines
237 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
TIMEOUT=10 # Metro should not take this long to start.
|
|
|
|
while [ "${TIMEOUT}" -gt 0 ]; do
|
|
if ! lsof -i:8081 &> /dev/null; then
|
|
echo "."
|
|
sleep 1
|
|
((TIMEOUT--))
|
|
else
|
|
break
|
|
fi
|
|
done
|