lib/xcode/install.rb in xcode-install-2.6.2 vs lib/xcode/install.rb in xcode-install-2.6.3
- old
+ new
@@ -6,12 +6,14 @@
require 'rubygems/version'
require 'xcode/install/command'
require 'xcode/install/version'
require 'shellwords'
require 'open3'
+require 'fastlane'
+require 'fastlane/helper/sh_helper'
require 'fastlane/action'
-require 'fastlane/actions/verify_build'
+require 'fastlane/actions/verify_xcode'
module XcodeInstall
CACHE_DIR = Pathname.new("#{ENV['HOME']}/Library/Caches/XcodeInstall")
class Curl
COOKIES_PATH = Pathname.new('/tmp/curl-cookies.txt')
@@ -574,13 +576,10 @@
template
end
end
class InstalledXcode
- TEAM_IDENTIFIER = '59GAB85EFG'.freeze
- AUTHORITY = 'Software Signing'.freeze
-
attr_reader :path
attr_reader :version
attr_reader :bundle_version
attr_reader :uuid
attr_reader :downloadable_index_url
@@ -685,13 +684,13 @@
puts `/usr/bin/codesign --verify --verbose #{@path}`
$?.exitstatus.zero?
end
def verify_app_cert
- cert_info = Fastlane::Actions::VerifyBuildAction.gather_cert_info(@path.to_s)
- apple_team_identifier_result = cert_info['team_identifier'] == TEAM_IDENTIFIER
- apple_authority_result = cert_info['authority'].include?(AUTHORITY)
- apple_team_identifier_result && apple_authority_result
+ Fastlane::Actions::VerifyXcodeAction.run(xcode_path: @path.to_s)
+ true
+ rescue
+ false
end
end
# A version of Xcode we fetched from the Apple Developer Portal
# we can download & install.