Skip to content

Commit

Permalink
Merge pull request #266 from vitelabs/release
Browse files Browse the repository at this point in the history
2.2.0
  • Loading branch information
shitong authored May 21, 2019
2 parents 1551eff + 66265f8 commit dc88795
Show file tree
Hide file tree
Showing 20 changed files with 388 additions and 191 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,10 @@ cache:
addons:
ssh_known_hosts:
- github.com

branches:
only:
- develop
- pre-mainnet
- grin
- travis
259 changes: 147 additions & 112 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,142 +3,177 @@ inhibit_all_warnings!
source 'https://github.com/CocoaPods/Specs.git'
require './vite_pod'

targetArray = ['Vite']
isOfficial = true

def vite_config(config, official)
if official
if config.name.include?("Debug")
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)','DEBUG=1','OFFICIAL=1']
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = ['DEBUG','OFFICIAL']
config.build_settings['OTHER_SWIFT_FLAGS'] = '$(inherited) -Xfrontend -debug-time-function-bodies'
elsif config.name.include?("Test")
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)','TEST=1','OFFICIAL=1']
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = ['TEST','OFFICIAL']
elsif config.name.include?("Release")
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)','OFFICIAL=1']
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = 'OFFICIAL'
end
else
if config.name.include?("Debug")
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)','DEBUG=1']
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = ['DEBUG']
config.build_settings['OTHER_SWIFT_FLAGS'] = '$(inherited) -Xfrontend -debug-time-function-bodies'
elsif config.name.include?("Test")
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = []
elsif config.name.include?("Release")
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = []
end
end
end

targetArray.each do |t|
target t do
use_frameworks!
app_project = Xcodeproj::Project.open(Dir.glob("*.xcodeproj")[0])
app_project.native_targets.each do |target|
if target.name == 'Vite'
target.build_configurations.each do |config|
vite_config config, isOfficial
end
end
end
app_project.save

#vite kit

vite_community_git = 'https://github.com/vitelabs/vite-community-ios.git'
vite_business_git = 'https://github.com/vitelabs/vite-business-ios.git'
vite_wallet_git = 'https://github.com/vitelabs/vite-wallet-ios.git'
vite_ethereum_git = 'https://github.com/vitelabs/vite-ethereum-ios.git'

vite_community_commit = '8aaaaf2eeeb32c97c54a01280aea9ffe7ac704c0'
vite_business_commit = 'b72f8f856410247665291102918286e4b27582a3'
vite_wallet_commit = 'c361cfd46f9ffeb39fd480561422784e8b726630'
target 'Vite' do
use_frameworks!

vite_pod 'ViteCommunity', :git => vite_community_git, :commit => vite_community_commit
vite_pod 'ViteBusiness', :git => vite_business_git, :commit => vite_business_commit

vite_pod 'ViteEthereum', :git => 'https://github.com/vitelabs/vite-ethereum-ios.git', :commit => 'cb3d0a8fe3cbe278470e18ea57734bf8efa94d07'
vite_pod 'ViteWallet', :git => vite_wallet_git, :commit => vite_wallet_commit
vite_pod 'Vite_HDWalletKit', '1.3.0'

vite_pod 'Vite_GrinWallet', :git => 'https://github.com/vitelabs/Vite_GrinWallet.git', :commit => '486abe32b4ac7566ddd0d4f89ff5c67802609865'

pod 'SnapKit', '~> 4.0.0'
pod 'BigInt', '~> 3.0'
pod 'R.swift', '5.0.0.alpha.3'
pod 'JSONRPCKit', '~> 3.0.0'
pod 'PromiseKit', '~> 6.0'
pod 'APIKit'
pod 'ObjectMapper'
pod 'MBProgressHUD'
pod 'KeychainSwift'
pod 'Moya'
pod 'MJRefresh'
pod 'KMNavigationBarTransition'
pod 'XCGLogger', '~> 6.1.0'
pod 'pop', '~> 1.0'
pod 'DACircularProgress', '2.3.1'
pod 'Kingfisher', '~> 4.0'
pod 'NYXImagesKit', '2.3'

#request
pod 'SwiftyJSON'

#statistics
pod 'BaiduMobStat'

#UI Control
pod 'ActionSheetPicker-3.0'
pod 'MBProgressHUD'
pod 'Toast-Swift', '~> 4.0.1'
pod 'RazzleDazzle'
pod 'CHIPageControl'

#table static form
pod 'Eureka', '~> 4.3.0'

#RX
pod 'RxSwift', '~> 4.0'
pod 'RxCocoa'
pod 'RxDataSources', '~> 3.0'
pod 'NSObject+Rx'
pod 'RxOptional'
pod 'RxGesture'
pod 'Then'
pod 'Action'
pod 'ReusableKit', '~> 2.1.0'
pod 'ReactorKit'

#code review
pod 'SwiftLint'

#crash
pod 'Fabric', '~> 1.9.0'
pod 'Crashlytics', '~> 3.12.0'
pod 'Firebase/Core'

pod 'MLeaksFinder', :configurations => ['Debug']

pod 'FSPagerView'
pod 'DNSPageView'

if t == 'Vite'
target 'ViteTests' do
inherit! :search_paths
end
end
#vite kit

vite_community_git = 'https://github.com/vitelabs/vite-community-ios.git'
vite_business_git = 'https://github.com/vitelabs/vite-business-ios.git'
vite_wallet_git = 'https://github.com/vitelabs/vite-wallet-ios.git'
vite_ethereum_git = 'https://github.com/vitelabs/vite-ethereum-ios.git'
vite_grin_git = 'https://github.com/vitelabs/Vite_GrinWallet.git'
vite_hd_git = 'https://github.com/vitelabs/vite-keystore-ios.git'

vite_community_commit = '0dae2eefd243ee417b4d1be188d063afcedf1cbb'
vite_business_commit = 'ab21e27e5c938b21cda04ad542c8e4409387a9dc'
vite_wallet_commit = '363fcd9e3759aa9619f1a4d1ca8c6d0f23268cfc'
vite_ethereum_commit = '6ddc0b795c65a7a34e84aa196c76f179e032ed97'
vite_grin_commit = '486abe32b4ac7566ddd0d4f89ff5c67802609865'
vite_hd_commit = '14d8e1d4f26e27e92439c688b8c65a029c8395f9'

if isOfficial
vite_pod 'ViteCommunity', :git => vite_community_git, :commit => vite_community_commit
end
vite_pod 'ViteBusiness', :git => vite_business_git, :commit => vite_business_commit
vite_pod 'ViteWallet', :git => vite_wallet_git, :commit => vite_wallet_commit


# pod_branch = 'pre-mainnet'
# if isOfficial
# vite_pod 'ViteCommunity', :git => vite_community_git, :branch => pod_branch
# end
# vite_pod 'ViteBusiness', :git => vite_business_git, :branch => pod_branch
# vite_pod 'ViteWallet', :git => vite_wallet_git, :branch => pod_branch


vite_pod 'ViteEthereum', :git => vite_ethereum_git, :commit => vite_ethereum_commit
vite_pod 'Vite_HDWalletKit', :git => vite_hd_git, :commit => vite_hd_commit
vite_pod 'Vite_GrinWallet', :git => vite_grin_git, :commit => vite_grin_commit

pod 'SnapKit', '~> 4.0.0'
pod 'BigInt', '~> 3.0'
pod 'R.swift', '5.0.0.alpha.3'
pod 'JSONRPCKit', '~> 3.0.0'
pod 'PromiseKit', '~> 6.8.4'
pod 'APIKit'
pod 'ObjectMapper'
pod 'MBProgressHUD'
pod 'KeychainSwift'
pod 'Moya'
pod 'MJRefresh'
pod 'KMNavigationBarTransition'
pod 'XCGLogger', '~> 6.1.0'
pod 'pop', '~> 1.0'
pod 'DACircularProgress', '2.3.1'
pod 'Kingfisher', '~> 4.0'
pod 'NYXImagesKit', '2.3'

#request
pod 'SwiftyJSON'

#statistics
pod 'BaiduMobStat'

#UI Control
pod 'ActionSheetPicker-3.0'
pod 'MBProgressHUD'
pod 'Toast-Swift', '~> 4.0.1'
pod 'RazzleDazzle'
pod 'CHIPageControl'

#table static form
pod 'Eureka', '~> 4.3.0'

#RX
pod 'RxSwift', '~> 4.0'
pod 'RxCocoa'
pod 'RxDataSources', '~> 3.0'
pod 'NSObject+Rx'
pod 'RxOptional'
pod 'RxGesture'
pod 'Then'
pod 'Action'
pod 'ReusableKit', '~> 2.1.0'
pod 'ReactorKit'

#code review
pod 'SwiftLint'

#crash
pod 'Fabric', '~> 1.9.0'
pod 'Crashlytics', '~> 3.12.0'
pod 'Firebase/Core'

pod 'MLeaksFinder', :configurations => ['Debug']
pod 'Bagel', '~> 1.3.2', :configurations => ['Debug', 'Test']

pod 'FSPagerView'
pod 'DNSPageView'

target 'ViteTests' do
inherit! :search_paths
end
end


post_install do |installer|

installer.pods_project.targets.each do |target|

target.build_configurations.each do |config|

config.build_settings['ENABLE_BITCODE'] = 'NO'

#debug
if config.name.include?("Debug")

config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)','DEBUG=1','OFFICIAL=1']
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = ['DEBUG','OFFICIAL']
end

#Internal
if config.name.include?("Internal")

config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
end
#test
if config.name.include?("Test")

else
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)','TEST=1']
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = 'TEST'
end
#Release
if config.name.include?("Release")

config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)','OFFICIAL=1']
config.build_settings['SWIFT_ACTIVE_COMPILATION_CONDITIONS'] = 'OFFICIAL'
end
vite_config config, isOfficial
end

if ['RazzleDazzle', 'JSONRPCKit', 'APIKit'].include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.0'
end
end

if ['web3swift'].include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5.0'
end
end
end


end
Loading

0 comments on commit dc88795

Please sign in to comment.