Have CocoaPods read some values from package.json

Summary:Allows you to keep versions, descriptions in sync
Closes https://github.com/facebook/react-native/pull/6576

Differential Revision: D3110926

fb-gh-sync-id: 7f1a2071feff5918e09f6c252ff9770f2f53130f
fbshipit-source-id: 7f1a2071feff5918e09f6c252ff9770f2f53130f
This commit is contained in:
Ian MacLeod 2016-03-29 13:23:52 -07:00 committed by Facebook Github Bot 3
parent 900078486a
commit 97d15f7f0a
1 changed files with 7 additions and 3 deletions

View File

@ -1,7 +1,11 @@
require 'json'
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
Pod::Spec.new do |s|
s.name = "React"
s.version = "0.0.1-master"
s.summary = "Build high quality mobile apps using React."
s.version = package['version']
s.summary = package['description']
s.description = <<-DESC
React Native apps are built using the React JS
framework, and render directly to native UIKit
@ -16,7 +20,7 @@ Pod::Spec.new do |s|
quality or capability.
DESC
s.homepage = "http://facebook.github.io/react-native/"
s.license = "BSD"
s.license = package['license']
s.author = "Facebook"
s.source = { :git => "https://github.com/facebook/react-native.git", :tag => "v#{s.version}" }
s.default_subspec = 'Core'