From b3ce619f25d0d3df5b412cde0743f31a93b9e590 Mon Sep 17 00:00:00 2001 From: Gio Lodi Date: Tue, 6 Jun 2023 12:10:28 +1000 Subject: [PATCH] Make iOS deployment version a Ruby constant in `Podfile` Just for consistency with the file path and to write what is hopefully more idiomatic Ruby. --- Podfile | 6 +++--- Podfile.lock | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Podfile b/Podfile index 2f4016fa7fac..4f9419b8099a 100644 --- a/Podfile +++ b/Podfile @@ -12,9 +12,9 @@ source 'https://cdn.cocoapods.org/' raise 'Please run CocoaPods via `bundle exec`' unless %w[BUNDLE_BIN_PATH BUNDLE_GEMFILE].any? { |k| ENV.key?(k) } VERSION_XCCONFIG_PATH = File.join(File.expand_path(__dir__), 'config', 'Common.xcconfig') -app_ios_deployment_target = Gem::Version.new(Xcodeproj::Config.new(VERSION_XCCONFIG_PATH).to_hash['IPHONEOS_DEPLOYMENT_TARGET']) +APP_IOS_DEPLOYMENT_TARGET = Gem::Version.new(Xcodeproj::Config.new(VERSION_XCCONFIG_PATH).to_hash['IPHONEOS_DEPLOYMENT_TARGET']) -platform :ios, app_ios_deployment_target.version +platform :ios, APP_IOS_DEPLOYMENT_TARGET.version inhibit_all_warnings! use_frameworks! workspace 'WordPress.xcworkspace' @@ -395,7 +395,7 @@ post_install do |installer| target.build_configurations.each do |configuration| pod_ios_deployment_target = Gem::Version.new(configuration.build_settings['IPHONEOS_DEPLOYMENT_TARGET']) - configuration.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' if pod_ios_deployment_target <= app_ios_deployment_target + configuration.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' if pod_ios_deployment_target <= APP_IOS_DEPLOYMENT_TARGET end end diff --git a/Podfile.lock b/Podfile.lock index 80a107b61b1b..41ca129f7f11 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -900,6 +900,6 @@ SPEC CHECKSUMS: ZendeskSupportSDK: 3a8e508ab1d9dd22dc038df6c694466414e037ba ZIPFoundation: ae5b4b813d216d3bf0a148773267fff14bd51d37 -PODFILE CHECKSUM: c7c2c52286d19a44c43428c8f4bb5647e1014861 +PODFILE CHECKSUM: c4bdcbac21a417ad5d771fc6fe99602db67b4fa8 COCOAPODS: 1.11.3