Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Update Emission to 1.50, using React Native 0.54.4 #1012

Merged
merged 7 commits into from
May 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

-->

### Master
### 1.5.0

* Adds Recently Viewed Works rail to Home - sarah
* Upgrade to React Native 0.54.4 - alloy/orta
Expand Down
2 changes: 1 addition & 1 deletion Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PODS:
- UIView+BooleanAnimations
- boost-for-react-native (1.63.0)
- DoubleConversion (1.1.5)
- Emission (1.4.6):
- Emission (1.5.0):
- Artsy+UIColors
- Artsy+UIFonts (>= 3.0.0)
- DoubleConversion (= 1.1.5)
Expand Down
27 changes: 14 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,38 +58,39 @@ oss:
JQ := $(shell command -v jq 2> /dev/null)
RNVERSION=$(shell cd node_modules/react-native && pod ipc spec React.podspec | jq '.version' -r)
YOGAVERSION=$(shell cd node_modules/react-native/ReactCommon/yoga && pod ipc spec yoga.podspec | jq '.version' -r)
FOLLYVERSION=$(shell cd node_modules/react-native/third-party-podspecs && pod ipc spec Folly.podspec | jq '.version' -r)
DOUBLECONVERSIONVERSION=$(shell cd node_modules/react-native/third-party-podspecs && pod ipc spec DoubleConversion.podspec | jq '.version' -r)
GLOGVERSION=$(shell cd node_modules/react-native/third-party-podspecs && pod ipc spec glog.podspec | jq '.version' -r)
YOGA_SRC_BEFORE=yoga\/\*\*\/\*.{c,h}
YOGA_SRC_AFTER=ReactCommon\/yoga\/yoga\/\*\*\/\*.\{c,h\}
YOGA_MASTER_PODSPEC_URL = "https://raw.githubusercontent.com/facebook/react-native/master/ReactCommon/yoga/yoga.podspec"

update_specs_repos:
ifndef JQ
$(error "Please install jq before running `brew install jq`")
endif

# Comment out Yoga, as it's dealt with below in ship_yoga

@echo "Updating Artsy specs repo";
pod repo update artsy

@echo "Creating folder in artsy specs repo";
mkdir ~/.cocoapods/repos/artsy/React/$(RNVERSION)
mkdir ~/.cocoapods/repos/artsy/yoga/$(YOGAVERSION)
mkdir ~/.cocoapods/repos/artsy/Folly/$(FOLLYVERSION)
mkdir ~/.cocoapods/repos/artsy/DoubleConversion/$(DOUBLECONVERSIONVERSION)
mkdir ~/.cocoapods/repos/artsy/glog/$(GLOGVERSION)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code was wrong, we didn't need to ship them to our specs repo because they existed inside the public specs repo

# mkdir ~/.cocoapods/repos/artsy/yoga/$(YOGAVERSION)

@echo "Putting JSON specs in the folders";
cd node_modules/react-native && pod ipc spec React.podspec > ~/.cocoapods/repos/artsy/React/$(RNVERSION)/React.podspec.json
cd node_modules/react-native/ReactCommon/yoga && pod ipc spec yoga.podspec > ~/.cocoapods/repos/artsy/yoga/$(YOGAVERSION)/yoga.podspec.json
cd node_modules/react-native/third-party-podspecs && pod ipc spec Folly.podspec > ~/.cocoapods/repos/artsy/Folly/$(FOLLYVERSION)/Folly.podspec.json
cd node_modules/react-native/third-party-podspecs && pod ipc spec DoubleConversion.podspec > ~/.cocoapods/repos/artsy/DoubleConversion/$(DOUBLECONVERSIONVERSION)/DoubleConversion.podspec.json
cd node_modules/react-native/third-party-podspecs && pod ipc spec glog.podspec > ~/.cocoapods/repos/artsy/glog/$(GLOGVERSION)/glog.podspec.json
# cd node_modules/react-native/ReactCommon/yoga && pod ipc spec yoga.podspec > ~/.cocoapods/repos/artsy/yoga/$(YOGAVERSION)/yoga.podspec.json

@echo "Modifying Yoga to reflect the React Native repo paths"
sed -i -e 's/$(YOGA_SRC_BEFORE)/$(YOGA_SRC_AFTER)/g' ~/.cocoapods/repos/artsy/Yoga/$(YOGAVERSION)/Yoga.podspec.json
# @echo "Modifying Yoga to reflect the React Native repo paths"
# sed -i -e 's/$(YOGA_SRC_BEFORE)/$(YOGA_SRC_AFTER)/g' ~/.cocoapods/repos/artsy/Yoga/$(YOGAVERSION)/Yoga.podspec.json

@echo "Commiting the changes to our shared repo"
cd ~/.cocoapods/repos/artsy && git add .
cd ~/.cocoapods/repos/artsy && git commit -m "Shipping a new version of the React deps: v$(RNVERSION) for Emission deploys"
cd ~/.cocoapods/repos/artsy && git push

# Use this PR for yoga podspec
# https://github.com/facebook/react-native/pull/18492
ship_yoga:
# curl $(YOGA_MASTER_PODSPEC_URL) > ./externals/yoga/yoga.podspec
INSTALL_YOGA_WITHOUT_PATH_OPTION="true" pod ipc spec ./externals/yoga/yoga.podspec > ./externals/yoga/yoga.podspec.json
# rm -f ./externals/yoga/yoga.podspec
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 0.54.2 version of RN does not include facebook/react-native#18492 - so, we use the master version and run that through the pod IPC command to generate JSON to put in this repo

1,863 changes: 1,018 additions & 845 deletions Pod/Assets/Emission.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Pod/Assets/Emission.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Pod/Assets/Emission.js.meta
Original file line number Diff line number Diff line change
@@ -1 +1 @@
��+��;ɨ�T�ɠO�8
V3���;K���`�M�6�s
47 changes: 47 additions & 0 deletions externals/yoga/yoga.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version = "0.54.4"

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
else
source[:tag] = "v#{version}"
end

Pod::Spec.new do |spec|
spec.name = 'yoga'
spec.version = "#{version}.React"
spec.license = { :type => 'MIT' }
spec.homepage = 'https://facebook.github.io/yoga/'
spec.documentation_url = 'https://facebook.github.io/yoga/docs/api/c/'

spec.summary = 'Yoga is a cross-platform layout engine which implements Flexbox.'
spec.description = 'Yoga is a cross-platform layout engine enabling maximum collaboration within your team by implementing an API many designers are familiar with, and opening it up to developers across different platforms.'

spec.authors = 'Facebook'
spec.source = source

spec.module_name = 'yoga'
spec.requires_arc = false
spec.compiler_flags = [
'-fno-omit-frame-pointer',
'-fexceptions',
'-Wall',
'-Werror',
'-std=c++1y',
'-fPIC'
]

# Pinning to the same version as React.podspec.
spec.platforms = { :ios => "8.0", :tvos => "9.2" }

# Set this environment variable when *not* using the `:path` option to install the pod.
# E.g. when publishing this spec to a spec repo.
source_files = 'yoga/**/*.{cpp,h}'
source_files = File.join('ReactCommon/yoga', source_files) if ENV['INSTALL_YOGA_WITHOUT_PATH_OPTION']
spec.source_files = source_files

header_files = 'yoga/{Yoga,YGEnums,YGMacros}.h'
header_files = File.join('ReactCommon/yoga', header_files) if ENV['INSTALL_YOGA_WITHOUT_PATH_OPTION']
spec.public_header_files = header_files
end
32 changes: 32 additions & 0 deletions externals/yoga/yoga.podspec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "yoga",
"version": "0.54.4.React",
"license": {
"type": "MIT"
},
"homepage": "https://facebook.github.io/yoga/",
"documentation_url": "https://facebook.github.io/yoga/docs/api/c/",
"summary": "Yoga is a cross-platform layout engine which implements Flexbox.",
"description": "Yoga is a cross-platform layout engine enabling maximum collaboration within your team by implementing an API many designers are familiar with, and opening it up to developers across different platforms.",
"authors": "Facebook",
"source": {
"git": "https://github.com/facebook/react-native.git",
"tag": "v0.54.4"
},
"module_name": "yoga",
"requires_arc": false,
"compiler_flags": [
"-fno-omit-frame-pointer",
"-fexceptions",
"-Wall",
"-Werror",
"-std=c++1y",
"-fPIC"
],
"platforms": {
"ios": "8.0",
"tvos": "9.2"
},
"source_files": "ReactCommon/yoga/yoga/**/*.{cpp,h}",
"public_header_files": "ReactCommon/yoga/yoga/{Yoga,YGEnums,YGMacros}.h"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "emission",
"version": "1.4.6",
"version": "1.5.0",
"native-code-version": 2,
"description": "Artsy React(Native) components.",
"engines": {
Expand Down