Skip to content

Commit

Permalink
Use an absolute path when reading xcconfig in Podfile
Browse files Browse the repository at this point in the history
This makes the command executable outside the project's root.
  • Loading branch information
mokagio committed Jun 6, 2023
1 parent 3447696 commit 24344b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ source 'https://cdn.cocoapods.org/'

raise 'Please run CocoaPods via `bundle exec`' unless %w[BUNDLE_BIN_PATH BUNDLE_GEMFILE].any? { |k| ENV.key?(k) }

inhibit_all_warnings!
use_frameworks!

app_ios_deployment_target = Gem::Version.new(Xcodeproj::Config.new(File.new('./config/Common.xcconfig')).to_hash['IPHONEOS_DEPLOYMENT_TARGET'])
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'])

platform :ios, app_ios_deployment_target.version
inhibit_all_warnings!
use_frameworks!
workspace 'WordPress.xcworkspace'

## Pods shared between all the targets
Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,6 @@ SPEC CHECKSUMS:
ZendeskSupportSDK: 3a8e508ab1d9dd22dc038df6c694466414e037ba
ZIPFoundation: ae5b4b813d216d3bf0a148773267fff14bd51d37

PODFILE CHECKSUM: 426583a8ff5caa0841987b35183c76d4759de053
PODFILE CHECKSUM: c7c2c52286d19a44c43428c8f4bb5647e1014861

COCOAPODS: 1.11.3

0 comments on commit 24344b0

Please sign in to comment.