Skip to content

Commit

Permalink
Fix issue with whitespace in path to source and stabilise CI.
Browse files Browse the repository at this point in the history
Summary:
* Fixes issue where headers could not be found due to whitespace in an unquoted header search path. #11781 (comment)
* Stabilises CI but not needing to download the source for Yoga, but use the existing cloned repo instead.

/cc mkonicek
Closes #13007

Differential Revision: D4735347

fbshipit-source-id: 933aefcb0e65537d2e759d25f4e3b81cdf4b8cb5
  • Loading branch information
alloy authored and facebook-github-bot committed Mar 18, 2017
1 parent 9c3e6ae commit 09b8ef4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions React.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ Pod::Spec.new do |s|
s.subspec "jschelpers" do |ss|
ss.source_files = "ReactCommon/jschelpers/{JavaScriptCore,JSCWrapper}.{cpp,h}", "ReactCommon/jschelpers/systemJSCWrapper.cpp"
ss.private_header_files = "ReactCommon/jschelpers/{JavaScriptCore,JSCWrapper}.h"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "$(PODS_TARGET_SRCROOT)/ReactCommon" }
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
ss.framework = "JavaScriptCore"
end

s.subspec "cxxreact" do |ss|
ss.dependency "React/jschelpers"
ss.source_files = "ReactCommon/cxxreact/{JSBundleType,oss-compat-util}.{cpp,h}"
ss.private_header_files = "ReactCommon/cxxreact/{JSBundleType,oss-compat-util}.h"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "$(PODS_TARGET_SRCROOT)/ReactCommon" }
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
end

s.subspec "ART" do |ss|
Expand Down
2 changes: 1 addition & 1 deletion ReactCommon/yoga/Yoga.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package = JSON.parse(File.read(File.expand_path('../../package.json', __dir__)))
version = package['version']

source = { :git => 'https://github.com/facebook/react-native.git' }
source = { :git => ENV['INSTALL_YOGA_FROM_LOCATION'] || 'https://github.com/facebook/react-native.git' }
if version == '1000.0.0'
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
source[:commit] = `git rev-parse HEAD`.strip
Expand Down
2 changes: 1 addition & 1 deletion scripts/process-podspecs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ push() {
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 pod ipc spec $SPEC_NAME > $SPEC_PATH
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.
Expand Down

0 comments on commit 09b8ef4

Please sign in to comment.