class Fastlane::Actions::ParsePodDependenciesAction
Public Class Methods
available_options()
click to toggle source
# File lib/fastlane/plugin/ios_dependency_parser/actions/ios_dependency_parser_action.rb, line 56 def self.available_options [] end
description()
click to toggle source
# File lib/fastlane/plugin/ios_dependency_parser/actions/ios_dependency_parser_action.rb, line 40 def self.description "Analyzes 'pod outdated' results and structures it for further usage." end
details()
click to toggle source
# File lib/fastlane/plugin/ios_dependency_parser/actions/ios_dependency_parser_action.rb, line 52 def self.details "This plugin will run 'pod outdated' and will parse its results into an array of Pod(s) which could later be used in your script" end
is_supported?(platform)
click to toggle source
# File lib/fastlane/plugin/ios_dependency_parser/actions/ios_dependency_parser_action.rb, line 60 def self.is_supported?(platform) platform == :ios end
return_value()
click to toggle source
# File lib/fastlane/plugin/ios_dependency_parser/actions/ios_dependency_parser_action.rb, line 48 def self.return_value end
run(params)
click to toggle source
# File lib/fastlane/plugin/ios_dependency_parser/actions/ios_dependency_parser_action.rb, line 12 def self.run(params) if !File.exists?("Podfile") UI.user_error!("Couldn't find Podfile in active path") else executor = FastlaneCore::CommandExecutor UI.message("Collecting data about your pods, this may take a while... (running 'pod outdated')") pod_outdated_results = executor.execute(command: "pod outdated", print_all: false, print_command: false) pod_results = [] pod_version_regex = '- (?<pod_name>\S*) (?<current_version>\S*) -> (?<update_version>\S*) \(latest version (?<latest>\S*)\)' pod_outdated_results.each_line do |line| line_match = line.match(pod_version_regex) if line_match && line_match.captures pod_name = line_match.captures[0] current_version = line_match.captures[1] update_version = line_match.captures[2] latest = line_match.captures[3] pod = Pod.new(pod_name,current_version,update_version, latest) pod_results.push(pod) end end Actions.lane_context[SharedValues::POD_ANALYZER_RESULTS] = pod_results if pod_results end end