mirror of
https://github.com/status-im/react-native.git
synced 2025-01-14 03:26:07 +00:00
fe4f03517c
Summary: One of our automated project tools noted that these were all missing their copyright headers. Pull Request resolved: https://github.com/facebook/react-native/pull/21000 Differential Revision: D9721495 Pulled By: hramos fbshipit-source-id: 6ccf0f37165a0fe16cf06bd996d615f2286101dc
31 lines
1.2 KiB
Bash
Executable File
31 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
# Copyright (c) 2015-present, Facebook, Inc.
|
|
#
|
|
# This source code is licensed under the MIT license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
set -e
|
|
|
|
# Make sure we don't accidentally restore a cache that contains the Metro
|
|
# filename issue that was fixed in Metro 0.25, originally introduced in
|
|
# D6752278. Once fixed, this was causing sporadic failures in the iOS
|
|
# and tvOS workflows as the issue persisted in the cached node_modules
|
|
#
|
|
# The filename issue can be summarized as follows:
|
|
# A version of Metro was published to npm with HmrClient.js and
|
|
# HmrClient.js.flow files, while the repo contains HMRClient.js and
|
|
# HMRClient.js.flow. This was due to a case issue in the publisher's
|
|
# host machine.
|
|
# The issue this is checking for is manifested by the presence of all
|
|
# of the following files: HmrClient.js, HMRClient.js, HmrClient.js.flow,
|
|
# HMRClient.js.flow.
|
|
|
|
EXPECTED='1'
|
|
ACTUAL=$(ls node_modules/metro/src/lib/bundle-modules/*.js | xargs | awk '{print tolower($0)}' | tr ' ' '\n' | grep hmrclient.js | wc -l | tr -d '[:space:]')
|
|
|
|
if [ "$EXPECTED" != "$ACTUAL" ]; then
|
|
echo "HmrClient.js crept into the cache?"
|
|
echo $(ls node_modules/metro/src/lib/bundle-modules/H*lient.js)
|
|
exit 1
|
|
fi
|