fastlane/lib/fastlane/actions/spm.rb in fastlane_hotfix-2.165.1 vs fastlane/lib/fastlane/actions/spm.rb in fastlane_hotfix-2.187.0

- old
+ new

@@ -9,10 +9,11 @@ cmd << "--package-path #{params[:package_path]}" if params[:package_path] cmd << "--configuration #{params[:configuration]}" if params[:configuration] cmd << "--disable-sandbox" if params[:disable_sandbox] cmd << "--verbose" if params[:verbose] cmd << params[:command] if package_commands.include?(params[:command]) + cmd << "--enable-code-coverage" if params[:enable_code_coverage] && (params[:command] == 'generate-xcodeproj' || params[:command] == 'test') if params[:xcconfig] cmd << "--xcconfig-overrides #{params[:xcconfig]}" end if params[:xcpretty_output] cmd += ["2>&1", "|", "xcpretty", "--#{params[:xcpretty_output]}"] @@ -42,10 +43,15 @@ description: "The swift command (one of: #{available_commands.join(', ')})", default_value: "build", verify_block: proc do |value| UI.user_error!("Please pass a valid command. Use one of the following: #{available_commands.join(', ')}") unless available_commands.include?(value) end), + FastlaneCore::ConfigItem.new(key: :enable_code_coverage, + env_name: "FL_SPM_ENABLE_CODE_COVERAGE", + description: "Enables code coverage for the generated Xcode project when using the 'generate-xcodeproj' and the 'test' command", + type: Boolean, + optional: true), FastlaneCore::ConfigItem.new(key: :build_path, env_name: "FL_SPM_BUILD_PATH", description: "Specify build/cache directory [default: ./.build]", optional: true), FastlaneCore::ConfigItem.new(key: :package_path, @@ -66,11 +72,11 @@ end), FastlaneCore::ConfigItem.new(key: :disable_sandbox, env_name: "FL_SPM_DISABLE_SANDBOX", description: "Disable using the sandbox when executing subprocesses", optional: true, - is_string: false, + type: Boolean, default_value: false), FastlaneCore::ConfigItem.new(key: :xcpretty_output, env_name: "FL_SPM_XCPRETTY_OUTPUT", description: "Specifies the output type for xcpretty. eg. 'test', or 'simple'", optional: true, @@ -84,10 +90,10 @@ optional: true), FastlaneCore::ConfigItem.new(key: :verbose, short_option: "-v", env_name: "FL_SPM_VERBOSE", description: "Increase verbosity of informational output", - is_string: false, + type: Boolean, default_value: false) ] end def self.authors