Skip to content

Commit

Permalink
Automating publication of new releases (close #337)
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhanunlu committed Oct 17, 2019
1 parent b352bf9 commit 4b3b5cc
Show file tree
Hide file tree
Showing 10 changed files with 165 additions and 108 deletions.
2 changes: 1 addition & 1 deletion .slather.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
coverage_service: coveralls
xcodeproj: Snowplow.xcodeproj
workspace: Snowplow.xcworkspace
scheme: Snowplow
scheme: Snowplow-iOS
59 changes: 49 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,52 @@
language: objective-c
osx_image: xcode10.2

xcode_workspace: Snowplow.xcworkspace

stages:
- lint
- test
- name: deploy
if: tag IS present

jobs:
include:
- stage: lint
install: gem install cocoapods
script: pod lib lint --allow-warnings

# # FIXME: This test fails due to platform specific deps
# # - <<: *test
# # stage: test
# # xcode_scheme: Snowplow-macOS
# # xcode_destination: platform=macOS
# # before_script:
# # - carthage update --platform macOS
# # - pod install

- &test
stage: test
xcode_scheme: Snowplow-iOS
xcode_destination: platform=iOS Simulator,OS=12.1,name=iPhone X
before_script:
- carthage update --platform iOS
- pod install
after_success:
- gem install slather
- slather

- stage: deploy
script: pod trunk push --verbose --allow-warnings
osx_image: xcode10.2
language: objective-c
xcode_scheme: Snowplow-iOS
xcode_workspace: Snowplow.xcworkspace
on:
condition: $(< VERSION) == $TRAVIS_TAG
tags: true

env:
- TEST_PLATFORM="platform=iOS Simulator,OS=12.1,name=iPhone XR"
rvm:
- 2.3.7
before_install:
- gem install slather
- gem install xcpretty -N --no-document
install:
- ./.travis/install.sh
script: ./.travis/test.sh
after_success: slather
global:
- secure: FfsA8B/GHFnIst46Z9Z2VNzd38NTsRp/DLF3IGDWTZAUFMRqVVu2fC/KmfOMH47XMqhtdvOkAjCf0K9BzDrpEwypAz4h5BoZPR7x+sz5eZ91jSKGAK7R8JWvj2hihoPSCc+ytXQwQFZYzP1hM6Wfyc+37riU7w00eJEz3vexD3w=
- CODE_SIGNING_REQUIRED=NO
- CODE_SIGN_IDENTITY=""
3 changes: 0 additions & 3 deletions .travis/install.sh

This file was deleted.

10 changes: 0 additions & 10 deletions .travis/test.sh

This file was deleted.

68 changes: 12 additions & 56 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,59 +17,15 @@ target 'Snowplow-macOS' do
platform :osx, '10.9'
end

target 'Snowplow-iOSTests' do
inherit! :search_paths
platform :ios, '8.0'
pod 'Nocilla'
pod 'SnowplowIgluClient', :git => 'https://github.com/snowplow/iglu-objc-client.git', :branch => 'feature/carthage'
end

target 'Snowplow-macOSTests' do
platform :osx, '10.9'
pod 'Nocilla'
pod 'SnowplowIgluClient', :git => 'https://github.com/snowplow/iglu-objc-client.git', :branch => 'feature/carthage'
end

post_install do |installer|
handle_sqlite3 installer
installer.pods_project.targets.each do |target|
if ['ReachabilitySwift'].include? target.name
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.2'
end
end
end
end

def handle_sqlite3 installer
# We need to remove sqlite3 from the library
# For details see: https://github.com/CocoaPods/CocoaPods/issues/830
default_library = installer.aggregate_targets.detect { |i| i.target_definition.name == 'Snowplow-iOS' }
[default_library.xcconfig_relative_path('Debug'), default_library.xcconfig_relative_path('Release')].each do |path|
path = File.expand_path(File.join(File.dirname(__FILE__), path))
File.open("config.tmp", "w") do |io|
f = File.read(path)
f.gsub!(/-l"sqlite3"/, '')
io << f
end
FileUtils.mv("config.tmp", path)
end

# We need to add sqlite3 into the test suite
default_library = installer.aggregate_targets.detect { |i| i.target_definition.name == 'Snowplow-iOSTests' }
[default_library.xcconfig_relative_path('Debug'), default_library.xcconfig_relative_path('Release')].each do |path|
path = File.expand_path(File.join(File.dirname(__FILE__), path))
File.open("config.tmp", "w") do |io|
f = File.read(path)
f.gsub!(/(OTHER_LDFLAGS =)/, '\1 -l"sqlite3"')
io << f
end
FileUtils.mv("config.tmp", path)
end

installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
end
end
end
# target 'Snowplow-iOSTests' do
# inherit! :search_paths
# platform :ios, '8.0'
# pod 'Nocilla'
# pod 'SnowplowIgluClient', :git => 'https://github.com/snowplow/iglu-objc-client.git', :branch => 'feature/carthage'
# end

# target 'Snowplow-macOSTests' do
# platform :osx, '10.9'
# pod 'Nocilla'
# pod 'SnowplowIgluClient', :git => 'https://github.com/snowplow/iglu-objc-client.git', :branch => 'feature/carthage'
# end
33 changes: 6 additions & 27 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,21 @@ PODS:
- FMDB (2.6.2):
- FMDB/standard (= 2.6.2)
- FMDB/standard (2.6.2)
- Nocilla (0.11.0)
- ReachabilitySwift (4.3.0)
- SnowplowIgluClient (0.1.1):
- VVJSONSchemaValidation (~> 1.5.0)
- VVJSONSchemaValidation (1.5.0)
- ReachabilitySwift (4.3.1)

DEPENDENCIES:
- FMDB (= 2.6.2)
- Nocilla
- ReachabilitySwift
- SnowplowIgluClient (from `https://github.com/snowplow/iglu-objc-client.git`, branch `feature/carthage`)
- ReachabilitySwift (= 4.3.1)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
https://github.com/CocoaPods/Specs.git:
- FMDB
- Nocilla
- ReachabilitySwift
- VVJSONSchemaValidation

EXTERNAL SOURCES:
SnowplowIgluClient:
:branch: feature/carthage
:git: https://github.com/snowplow/iglu-objc-client.git

CHECKOUT OPTIONS:
SnowplowIgluClient:
:commit: 10b9758ef35c21d4bfee9c11d8f4813347a50097
:git: https://github.com/snowplow/iglu-objc-client.git

SPEC CHECKSUMS:
FMDB: 854a0341b4726e53276f2a8996f06f1b80f9259a
Nocilla: 7af7a386071150cc8aa5da4da97d060f049dd61c
ReachabilitySwift: 408477d1b6ed9779dba301953171e017c31241f3
SnowplowIgluClient: 4cda3cca105c844bea49b45e30145dc35cb5208d
VVJSONSchemaValidation: 40411ea98f65d065a7c2ce7483876106bf710e9b
ReachabilitySwift: 4032e2f59586e11e3b0ebe15b167abdd587a388b

PODFILE CHECKSUM: 047bc905c385190179c8d68cd4481474c8e05932
PODFILE CHECKSUM: a6bd6ad0686a2c387fd9b7843d659ff67614d90c

COCOAPODS: 1.5.3
COCOAPODS: 1.8.3
Loading

0 comments on commit 4b3b5cc

Please sign in to comment.