Upgrade CLI, restore prev status check value (#39077)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39077

Follow-up to https://github.com/facebook/react-native/pull/38988.

- Upgrade to RN CLI `12.0.0-alpha.11`.
- Restore previous value check against `/status` response in test scripts (restored in above CLI alpha).

Changelog: [Internal]

Reviewed By: motiz88

Differential Revision: D48432629

fbshipit-source-id: 175241ad75676281f4638e179873b2ce32f0ea3e
This commit is contained in:
Alex Hunt
2023-08-22 12:56:19 -07:00
committed by Facebook GitHub Bot
parent 8b62200605
commit a002fbbd6c
7 changed files with 85 additions and 119 deletions
+1 -21
View File
@@ -73,26 +73,6 @@ waitForWebSocketServer() {
echo "WebSocket Server is ready!"
}
waitForPackagerAlt() {
local -i max_attempts=60
local -i attempt_num=1
# TODO(huntie): Temporary string match in JSON response. We will revert
# this endpoint back to "packager-status:running" in the next CLI alpha.
until curl -s http://localhost:8081/status | grep "\"status\":\"running\"" -q; do
if (( attempt_num == max_attempts )); then
echo "Packager did not respond in time. No more attempts left."
exit 1
else
(( attempt_num++ ))
echo "Packager did not respond. Retrying for attempt number $attempt_num..."
sleep 1
fi
done
echo "Packager is ready!"
}
runTests() {
# shellcheck disable=SC1091
source "$ROOT/scripts/.tests.env"
@@ -151,7 +131,7 @@ main() {
# Start the packager
yarn start --max-workers=1 || echo "Can't start packager automatically" &
waitForPackagerAlt
waitForPackager
preloadBundlesRNTester
preloadBundlesRNIntegrationTests
-6
View File
@@ -117,12 +117,6 @@ function isPackagerRunning(
silent: true,
}).stdout;
// TODO(huntie): Temporary string match in JSON response. We will revert
// this endpoint back to "packager-status:running" in the next CLI alpha.
if (status.includes('"status":"running"')) {
return 'running';
}
return status === 'packager-status:running' ? 'running' : 'unrecognized';
} catch (_error) {
return 'not_running';