瀏覽代碼

Merge pull request #362 from kishikawakatsumi/carthage

Update carthage build test using Swift 4
Kishikawa Katsumi 7 年之前
父節點
當前提交
8f39d72f1d
共有 1 個文件被更改,包括 1 次插入11 次删除
  1. 1 11
      Lib/Rakefile

+ 1 - 11
Lib/Rakefile

@@ -109,7 +109,7 @@ namespace :build do
   end
 
   task :carthage do
-    sh %[echo 'github \"kishikawakatsumi/KeychainAccess\" \"#{branch_name}\"' > Cartfile]
+    sh %[echo 'github \"kishikawakatsumi/KeychainAccess\"' > Cartfile]
     if xcode_version.start_with?('8')
       sh %[echo SWIFT_VERSION=\"3.0\" > swift3.xcconfig]
       sh %[XCODE_XCCONFIG_FILE=`pwd`/swift3.xcconfig carthage update --no-use-binaries]
@@ -117,16 +117,6 @@ namespace :build do
       sh %[carthage update --no-use-binaries]
     end
   end
-
-  def branch_name
-    if ENV['CI']
-      pull_req = %[https://api.github.com/repos/#{ENV['TRAVIS_REPO_SLUG']}/pulls/#{ENV['TRAVIS_PULL_REQUEST']}]
-      auth_token = 'kishikawakatsumi:209558699492df7782fbe62dda1891d6a6ba010f'
-      (ENV['TRAVIS_PULL_REQUEST'] == 'false' ? ENV['TRAVIS_BRANCH'] : JSON.parse(`curl -u #{auth_token} -s #{pull_req}`)['head']['ref']).strip
-    else
-      %x[git rev-parse --abbrev-ref HEAD]
-    end
-  end
 end
 
 namespace :test do