lib/depcheck/finder.rb in depcheck-0.1.0 vs lib/depcheck/finder.rb in depcheck-0.2.0

- old
+ new

@@ -6,17 +6,17 @@ "-project \"#{project}\"" else "-workspace \"#{workspace}\" -scheme \"#{scheme}\"" end - build_settings = `xcodebuild #{arg} -showBuildSettings build CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO 2>&1` + build_settings = `xcodebuild #{arg} -showBuildSettings build CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO` + raise StandardError until $?.success? - if build_settings - derived_data_path = build_settings.match(/ OBJROOT = (.+)/) - derived_data_path = derived_data_path[1] if derived_data_path - end + derived_data_path = build_settings.match(/ OBJROOT = (.+)/)[1] + project_name = build_settings.match(/ PROJECT_NAME = (.+)/)[1] + target_name = build_settings.match(/ TARGET_NAME = (.+)/)[1] - derived_data_path + "#{derived_data_path}/#{project_name}.build/**/#{target_name}.build" end def self.find_swiftdeps(project, workspace, scheme) derived_data_path = find_derived_data_path(project, workspace, scheme) swiftdeps = Dir.glob("#{derived_data_path}/**/*.swiftdeps") if derived_data_path