class Fastlane::Actions::NugetPackAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/msbuild/actions/nuget_pack_action.rb, line 18
def self.authors
  ["fuzzybinary"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/msbuild/actions/nuget_pack_action.rb, line 26
def self.available_options
  [
    FastlaneCore::ConfigItem.new(
      key: :spec_file,
      env_name: 'FL_NUGET_SPEC_FILE',
      description: 'path to .nuspec file',
      verify_block: proc do |value|
        UI.user_error!('File not found'.red) unless File.file? value
      end
    ),
    FastlaneCore::ConfigItem.new(
      key: :out_dir,
      env_name: 'FL_NUGET_OUT_DIR',
      description: 'directory to output nupkg',
      optional: true,
      default_value: nil
    ),
    FastlaneCore::ConfigItem.new(
      key: :nuget_path,
      env_name: 'NUGET_PATH',
      description: 'path to nuget',
      optional: true,
      default_value: nil
    )
  ]
end
description() click to toggle source
# File lib/fastlane/plugin/msbuild/actions/nuget_pack_action.rb, line 14
def self.description
  "Package a nuspec"
end
details() click to toggle source
# File lib/fastlane/plugin/msbuild/actions/nuget_pack_action.rb, line 22
def self.details
  "Package a nuspec"
end
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/msbuild/actions/nuget_pack_action.rb, line 53
def self.is_supported?(platform)
  true
end
run(params) click to toggle source
# File lib/fastlane/plugin/msbuild/actions/nuget_pack_action.rb, line 4
def self.run(params)
  spec_file = params[:spec_file]

  nuget = params[:nuget_path] ? File.join(params[:nuget_path], "nuget") : "nuget"
  command = "#{nuget} pack #{spec_file}"
  command << " -OutputDirectory #{params[:out_dir]}" if params[:out_dir]

  FastlaneCore::CommandExecutor.execute(command: command, print_all: true, print_command: true)
end