forked from button/button-merchant-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Podfile
34 lines (26 loc) · 944 Bytes
/
Podfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
source 'https://cdn.cocoapods.org/'
platform :ios, '9.0'
use_frameworks!
pod 'SwiftLint'
target 'Example' do
end
target 'Example-ObjC' do
end
target 'UnitTests' do
end
target 'IntegrationTests' do
end
post_install do |installer|
podspec = JSON.parse(`pod ipc spec ./ButtonMerchant.podspec`)
version = podspec["version"]
version_file = 'Source/Version/Version.generated.swift'
version_test_file = 'Tests/UnitTests/Version/VersionTests.generated.swift'
File.write(version_file, File.read(version_file).gsub(/\d+.\d+.\d+/, version))
File.write(version_test_file, File.read(version_test_file).gsub(/\d+.\d+.\d+/, version))
`/usr/libexec/PlistBuddy -c "set :CFBundleShortVersionString '#{version}'" Source/Info.plist`
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end