Browse Source

Fix build script

Kishikawa Katsumi 6 years ago
parent
commit
56d3fac725
1 changed files with 10 additions and 2 deletions
  1. 10 2
      Lib/Rakefile

+ 10 - 2
Lib/Rakefile

@@ -270,7 +270,11 @@ namespace :build do
 
   task :carthage do
     sh %[echo 'github \"kishikawakatsumi/KeychainAccess\"' > Cartfile]
-    if xcode_version.start_with?('10')
+    if xcode_version.start_with?('11')
+      sh %[echo SWIFT_VERSION=\"5.1\" > swift.xcconfig]
+    elsif xcode_version.start_with?('10.3')
+      sh %[echo SWIFT_VERSION=\"5.0\" > swift.xcconfig]
+    elsif xcode_version.start_with?('10')
       sh %[echo SWIFT_VERSION=\"4.2\" > swift.xcconfig]
     elsif xcode_version.start_with?('9.4')
       sh %[echo SWIFT_VERSION=\"4.1\" > swift.xcconfig]
@@ -315,7 +319,11 @@ namespace :test do
           t.coverage = true
           t.build_dir = 'build'
           t.hide_shell_script_environment = true
-          if xcode_version.start_with?('10')
+          if xcode_version.start_with?('11')
+            t.add_build_setting('SWIFT_VERSION', '5.1')
+          elsif xcode_version.start_with?('10.3')
+            t.add_build_setting('SWIFT_VERSION', '5.0')
+          elsif xcode_version.start_with?('10')
             t.add_build_setting('SWIFT_VERSION', '4.2')
           elsif xcode_version.start_with?('9.4')
             t.add_build_setting('SWIFT_VERSION', '4.1')