Skip to content

Commit 3d7be5e

Browse files
committed
Update xcodebuild destination specifier
1 parent 43cd12d commit 3d7be5e

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ osx_image: xcode8.2
33
matrix:
44
include:
55
- env: VERSION=9.3
6-
- env: VERSION=latest
6+
- env: VERSION=10.2
77
script:
88
- bundle exec rake ci:build[$VERSION]
99
- make -B carthage

Rakefile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
task default: "ci:test"
22

3+
latest = "10.2"
4+
35
namespace :ci do
4-
desc "Build targets on Travis CI with a specified OS version, default OS=latest"
6+
desc "Build targets on Travis CI with a specified OS version, default OS=#{latest}"
57
task :build, [:os] do |t, args|
6-
version = args[:os] || "latest"
8+
version = args[:os] || latest
79
Rake::Task["framework:build"].invoke version
810
Rake::Task["example:build"].invoke version
911
end
1012

11-
desc "Run tests on Travis CI with a specified OS version, default OS=latest"
13+
desc "Run tests on Travis CI with a specified OS version, default OS=#{latest}"
1214
task :test, [:os] do |t, args|
13-
version = args[:os] || "latest"
15+
version = args[:os] || latest
1416
Rake::Task["framework:build"].invoke version
1517
# UI Testing requires iOS Simulator 9.0 or later.
16-
if version == "latest" || Gem::Version.new("9.0") <= Gem::Version.new(version)
18+
if Gem::Version.new("9.0") <= Gem::Version.new(version)
1719
Rake::Task["example:test"].invoke version
1820
else
1921
Rake::Task["example:build"].invoke version
@@ -24,15 +26,15 @@ end
2426
namespace :example do
2527
desc "Build the example project"
2628
task :build, [:os] do |t, args|
27-
version = args[:os] || "latest"
28-
sh %(xcodebuild -workspace ICInputAccessory.xcworkspace -scheme Example -sdk iphonesimulator -destination "name=iPhone 5,OS=#{version}" clean build | xcpretty -c && exit ${PIPESTATUS[0]})
29+
version = args[:os] || latest
30+
sh %(xcodebuild -workspace ICInputAccessory.xcworkspace -scheme Example -sdk iphonesimulator -destination "name=iPhone 6s,OS=#{version}" clean build | xcpretty -c && exit ${PIPESTATUS[0]})
2931
exit $?.exitstatus if not $?.success?
3032
end
3133

3234
desc "Run the UI tests in the example project"
3335
task :test, [:os] do |t, args|
34-
version = args[:os] || "latest"
35-
sh %(xcodebuild -workspace ICInputAccessory.xcworkspace -scheme Example -sdk iphonesimulator -destination "name=iPhone 6,OS=#{version}" clean test | xcpretty -c && exit ${PIPESTATUS[0]})
36+
version = args[:os] || latest
37+
sh %(xcodebuild -workspace ICInputAccessory.xcworkspace -scheme Example -sdk iphonesimulator -destination "name=iPhone 6s,OS=#{version}" clean test | xcpretty -c && exit ${PIPESTATUS[0]})
3638
exit $?.exitstatus if not $?.success?
3739
end
3840
end
@@ -41,7 +43,7 @@ namespace :framework do
4143
desc "Build the framework project"
4244
task :build, [:os] do |t, args|
4345
version = args[:os] || "latest"
44-
sh %(xcodebuild -project ICInputAccessory.xcodeproj -scheme ICInputAccessory-iOS -sdk iphonesimulator -destination "name=iPhone 5,OS=#{version}" clean build | xcpretty -c && exit ${PIPESTATUS[0]})
46+
sh %(xcodebuild -project ICInputAccessory.xcodeproj -scheme ICInputAccessory-iOS -sdk iphonesimulator -destination "name=iPhone 6s,OS=#{version}" clean build | xcpretty -c && exit ${PIPESTATUS[0]})
4547
exit $?.exitstatus if not $?.success?
4648
end
4749
end

0 commit comments

Comments
 (0)