mirror of
https://github.com/status-im/react-native.git
synced 2025-01-09 09:12:02 +00:00
2fef1bafc8
Summary: <!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html Happy contributing! --> This will fix compile error on case sensitive APFS(Apple File System) macs. Integrate RN on case sensitive formatted macOS via cocoa pods you will get compile errors on the include lines something like : ``` ^~~~~~~~~~~~~~~~ 1 error generated. ** BUILD FAILED ** ``` If you change `#include <glog/logging.h>` into `#include <GLog/logging.h>` (replace `glog` with `GLog`) it will fix the build error. After fixing this you will get same kind of errors on a few other places. [IOS] [BUGFIX] [Framework] - `GLog` fix on case sensitive APFS macOS Closes https://github.com/facebook/react-native/pull/17697 Differential Revision: D6832740 Pulled By: shergin fbshipit-source-id: 0c7a01f33fde35dbc8004c5bb6e5b22f8f0ea369
72 lines
2.1 KiB
Bash
Executable File
72 lines
2.1 KiB
Bash
Executable File
#!/bin/bash
|
|
set -ex
|
|
|
|
SCRIPTS=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
ROOT=$(dirname $SCRIPTS)
|
|
|
|
# Specify `SPEC_REPO` as an env variable if you want to push to a specific spec repo.
|
|
# Defaults to `react-test`, which is meant to be a dummy repo used to test that the specs fully lint.
|
|
: ${SPEC_REPO:="react-test"}
|
|
SPEC_REPO_DIR="$HOME/.cocoapods/repos/$SPEC_REPO"
|
|
|
|
# If the `SPEC_REPO` does not exist yet, assume this is purely for testing and create a dummy repo.
|
|
if ! [ -d "$SPEC_REPO_DIR" ]; then
|
|
mkdir -p "$SPEC_REPO_DIR"
|
|
cd "$SPEC_REPO_DIR"
|
|
touch .gitkeep
|
|
git init
|
|
git add .
|
|
git commit -m "init"
|
|
git remote add origin "https://example.com/$SPEC_REPO.git"
|
|
fi
|
|
|
|
cd "$SPEC_REPO_DIR"
|
|
SPEC_REPOS="$(git remote get-url origin),https://github.com/CocoaPods/Specs.git"
|
|
|
|
POD_LINT_OPT="--verbose --allow-warnings --fail-fast --private --swift-version=3.0 --sources=$SPEC_REPOS"
|
|
|
|
# Get the version from a podspec.
|
|
version() {
|
|
ruby -rcocoapods-core -rjson -e "puts Pod::Specification.from_file('$1').version"
|
|
}
|
|
|
|
# Lint both framework and static library builds.
|
|
lint() {
|
|
local SUBSPEC=$1
|
|
if [ "${SUBSPEC:-}" ]; then
|
|
local SUBSPEC_OPT="--subspec=$SUBSPEC"
|
|
fi
|
|
pod lib lint $SUBSPEC_OPT $POD_LINT_OPT
|
|
pod lib lint $SUBSPEC_OPT $POD_LINT_OPT --use-libraries
|
|
}
|
|
|
|
# Push the spec in arg `$1`, which is expected to be in the cwd, to the `SPEC_REPO` in JSON format.
|
|
push() {
|
|
local SPEC_NAME=$1
|
|
local POD_NAME=$(basename $SPEC_NAME .podspec)
|
|
local SPEC_DIR="$SPEC_REPO_DIR/$POD_NAME/$(version $SPEC_NAME)"
|
|
local SPEC_PATH="$SPEC_DIR/$SPEC_NAME.json"
|
|
mkdir -p $SPEC_DIR
|
|
env INSTALL_YOGA_WITHOUT_PATH_OPTION=1 INSTALL_YOGA_FROM_LOCATION="$ROOT" pod ipc spec $SPEC_NAME > $SPEC_PATH
|
|
}
|
|
|
|
# Perform linting and publishing of podspec in cwd.
|
|
# Skip linting with `SKIP_LINT` if e.g. publishing to a private spec repo.
|
|
process() {
|
|
cd $1
|
|
if [ -z "$SKIP_LINT" ]; then
|
|
lint $2
|
|
fi
|
|
local SPEC_NAME=(*.podspec)
|
|
push $SPEC_NAME
|
|
}
|
|
|
|
# Make third-party deps accessible
|
|
cd "$ROOT/third-party-podspecs"
|
|
push Folly.podspec
|
|
push DoubleConversion.podspec
|
|
push glog.podspec
|
|
|
|
process "$ROOT/ReactCommon/yoga"
|
|
process "$ROOT" _ignore_me_subspec_for_linting_
|