From 97d15f7f0a8090959efe5daf63e3cddb39462096 Mon Sep 17 00:00:00 2001 From: Ian MacLeod Date: Tue, 29 Mar 2016 13:23:52 -0700 Subject: [PATCH] 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 --- React.podspec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/React.podspec b/React.podspec index a1e7207e0..d71236631 100644 --- a/React.podspec +++ b/React.podspec @@ -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'