fastlane/lib/fastlane/actions/spm.rb in fastlane-2.114.0.beta.20190116200018 vs fastlane/lib/fastlane/actions/spm.rb in fastlane-2.114.0
- old
+ new
@@ -7,15 +7,18 @@
cmd << (package_commands.include?(params[:command]) ? "package" : params[:command])
cmd << "--build-path #{params[:build_path]}" if params[:build_path]
cmd << "--package-path #{params[:package_path]}" if params[:package_path]
cmd << "--configuration #{params[:configuration]}" if params[:configuration]
cmd << "--verbose" if params[:verbose]
+ cmd << params[:command] if package_commands.include?(params[:command])
+ if params[:xcconfig]
+ cmd << "--xcconfig-overrides #{params[:xcconfig]}"
+ end
if params[:xcpretty_output]
cmd += ["2>&1", "|", "xcpretty", "--#{params[:xcpretty_output]}"]
cmd = %w(set -o pipefail &&) + cmd
end
- cmd << params[:command] if package_commands.include?(params[:command])
FastlaneCore::CommandExecutor.execute(command: cmd.join(" "),
print_all: true,
print_command: true)
end
@@ -43,10 +46,14 @@
optional: true),
FastlaneCore::ConfigItem.new(key: :package_path,
env_name: "FL_SPM_PACKAGE_PATH",
description: "Change working directory before any other operation",
optional: true),
+ FastlaneCore::ConfigItem.new(key: :xcconfig,
+ env_name: "FL_SPM_XCCONFIG",
+ description: "Use xcconfig file to override swift package generate-xcodeproj defaults",
+ optional: true),
FastlaneCore::ConfigItem.new(key: :configuration,
short_option: "-c",
env_name: "FL_SPM_CONFIGURATION",
description: "Build with configuration (debug|release) [default: debug]",
optional: true,
@@ -68,11 +75,11 @@
default_value: false)
]
end
def self.authors
- ["Flávio Caetano (@fjcaetano)"]
+ ["fjcaetano", "nxtstep"]
end
def self.is_supported?(platform)
true
end
@@ -82,10 +89,14 @@
'spm',
'spm(
command: "build",
build_path: "./build",
configuration: "release"
+ )',
+ 'spm(
+ command: "generate-xcodeproj",
+ xcconfig: "Package.xcconfig"
)'
]
end
def self.category
@@ -95,10 +106,10 @@
def self.available_commands
%w(build test) + self.package_commands
end
def self.package_commands
- %w(clean reset update)
+ %w(clean reset update resolve generate-xcodeproj init)
end
def self.valid_configurations
%w(debug release)
end