class Fastlane::Actions::NugetRestoreAction
Public Class Methods
available_options()
click to toggle source
# File lib/fastlane/plugin/xamarin/actions/nuget_restore_action.rb, line 62 def self.available_options [ FastlaneCore::ConfigItem.new(key: :project_path, env_name: "NUGET_SOLUTION", description: "The location of a solution or a packages.config", optional: false, type: String), FastlaneCore::ConfigItem.new(key: :nuget, env_name: "NUGET_PATH", description: "Path to `nuget`. Default value is found by using `which nuget`", optional: true, type: String) ] end
description()
click to toggle source
# File lib/fastlane/plugin/xamarin/actions/nuget_restore_action.rb, line 45 def self.description "Nuget" end
details()
click to toggle source
# File lib/fastlane/plugin/xamarin/actions/nuget_restore_action.rb, line 57 def self.details "Nuget restore" end
is_supported?(platform)
click to toggle source
# File lib/fastlane/plugin/xamarin/actions/nuget_restore_action.rb, line 79 def self.is_supported?(platform) [:android, :ios].include?(platform) end
return_value()
click to toggle source
# File lib/fastlane/plugin/xamarin/actions/nuget_restore_action.rb, line 53 def self.return_value # If your method provides a return value, you can describe here what it does end
run(params)
click to toggle source
# File lib/fastlane/plugin/xamarin/actions/nuget_restore_action.rb, line 6 def self.run(params) nuget = params[:nuget] || FastlaneCore::CommandExecutor.which('nuget') if nuget.nil? UI.error("Could not find nuget") return end if FastlaneCore::Globals.verbose? FastlaneCore::PrintTable.print_values( config: params, title: "Summary of parameters passed" ) end command = Array.new command.push(nuget) command.push("restore") command.push(params[:project_path]) command.push("-NonInteractive") exit_status = 0 result = FastlaneCore::CommandExecutor.execute(command: command, print_command: true, print_all: FastlaneCore::Globals.verbose?, error: proc do |error_output| exit_status = $?.exitstatus end) if exit_status == 0 UI.success("Successfully executed nuget") else UI.user_error!("Uhh ohh - failed executing nuget") end end