fastlane/lib/fastlane/actions/pod_lib_lint.rb in fastlane-2.121.0.beta.20190421200026 vs fastlane/lib/fastlane/actions/pod_lib_lint.rb in fastlane-2.121.0.beta.20190422200029
- old
+ new
@@ -3,42 +3,22 @@
class PodLibLintAction < Action
def self.run(params)
command = []
command << "bundle exec" if params[:use_bundle_exec] && shell_out_should_use_bundle_exec?
-
command << "pod lib lint"
- if params[:verbose]
- command << "--verbose"
- end
-
command << params[:podspec] if params[:podspec]
-
- if params[:sources]
- sources = params[:sources].join(",")
- command << "--sources='#{sources}'"
- end
-
- if params[:include_podspecs]
- command << "--include-podspecs='#{params[:include_podspecs]}'"
- end
-
- if params[:external_podspecs]
- command << "--external-podspecs='#{params[:external_podspecs]}'"
- end
-
- if params[:swift_version]
- swift_version = params[:swift_version]
- command << "--swift-version=#{swift_version}"
- end
-
- if params[:allow_warnings]
- command << "--allow-warnings"
- end
-
+ command << "--verbose" if params[:verbose]
+ command << "--allow-warnings" if params[:allow_warnings]
+ command << "--sources='#{params[:sources].join(',')}'" if params[:sources]
+ command << "--subspec='#{params[:subspec]}'" if params[:subspec]
+ command << "--include-podspecs='#{params[:include_podspecs]}'" if params[:include_podspecs]
+ command << "--external-podspecs='#{params[:external_podspecs]}'" if params[:external_podspecs]
+ command << "--swift-version=#{params[:swift_version]}" if params[:swift_version]
command << "--use-libraries" if params[:use_libraries]
+ command << "--use-modular-headers" if params[:use_modular_headers]
command << "--fail-fast" if params[:fail_fast]
command << "--private" if params[:private]
command << "--quick" if params[:quick]
result = Actions.sh(command.join(' '))
@@ -60,60 +40,81 @@
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :use_bundle_exec,
description: "Use bundle exec when there is a Gemfile presented",
- is_string: false,
- default_value: true),
+ type: Boolean,
+ default_value: true,
+ env_name: "FL_POD_LIB_LINT_USE_BUNDLE"),
FastlaneCore::ConfigItem.new(key: :podspec,
description: "Path of spec to lint",
+ type: String,
optional: true,
- is_string: true),
+ env_name: "FL_POD_LIB_LINT_PODSPEC"),
FastlaneCore::ConfigItem.new(key: :verbose,
description: "Allow output detail in console",
+ type: Boolean,
optional: true,
- is_string: false),
+ env_name: "FL_POD_LIB_LINT_VERBOSE"),
FastlaneCore::ConfigItem.new(key: :allow_warnings,
description: "Allow warnings during pod lint",
+ type: Boolean,
optional: true,
- is_string: false),
+ env_name: "FL_POD_LIB_LINT_ALLOW_WARNINGS"),
FastlaneCore::ConfigItem.new(key: :sources,
description: "The sources of repos you want the pod spec to lint with, separated by commas",
- optional: true,
- is_string: false,
type: Array,
+ optional: true,
+ env_name: "FL_POD_LIB_LINT_SOURCES",
verify_block: proc do |value|
UI.user_error!("Sources must be an array.") unless value.kind_of?(Array)
end),
+ FastlaneCore::ConfigItem.new(key: :subspec,
+ description: "A specific subspec to lint instead of the entire spec",
+ type: String,
+ optional: true,
+ env_name: "FL_POD_LIB_LINT_SUBSPEC"),
FastlaneCore::ConfigItem.new(key: :include_podspecs,
description: "A Glob of additional ancillary podspecs which are used for linting via :path (available since cocoapods >= 1.7)",
+ type: String,
optional: true,
- is_string: true),
+ env_name: "FL_POD_LIB_LINT_INCLUDE_PODSPECS"),
FastlaneCore::ConfigItem.new(key: :external_podspecs,
description: "A Glob of additional ancillary podspecs which are used for linting via :podspec. If there"\
" are --include-podspecs, then these are removed from them (available since cocoapods >= 1.7)",
+ type: String,
optional: true,
- is_string: true),
+ env_name: "FL_POD_LIB_LINT_EXTERNAL_PODSPECS"),
FastlaneCore::ConfigItem.new(key: :swift_version,
description: "The SWIFT_VERSION that should be used to lint the spec. This takes precedence over a .swift-version file",
+ type: String,
optional: true,
- is_string: true),
+ env_name: "FL_POD_LIB_LINT_SWIFT_VERSION"),
FastlaneCore::ConfigItem.new(key: :use_libraries,
description: "Lint uses static libraries to install the spec",
- is_string: false,
- default_value: false),
+ type: Boolean,
+ default_value: false,
+ env_name: "FL_POD_LIB_LINT_USE_LIBRARIES"),
+ FastlaneCore::ConfigItem.new(key: :use_modular_headers,
+ description: "Lint using modular libraries",
+ type: Boolean,
+ default_value: false,
+ env_name: "FL_POD_LIB_LINT_USE_MODULAR_HEADERS"),
FastlaneCore::ConfigItem.new(key: :fail_fast,
description: "Lint stops on the first failing platform or subspec",
- is_string: false,
- default_value: false),
+ type: Boolean,
+ default_value: false,
+ env_name: "FL_POD_LIB_LINT_FAIL_FAST"),
FastlaneCore::ConfigItem.new(key: :private,
description: "Lint skips checks that apply only to public specs",
- is_string: false,
- default_value: false),
+ type: Boolean,
+ default_value: false,
+ env_name: "FL_POD_LIB_LINT_PRIVATE"),
FastlaneCore::ConfigItem.new(key: :quick,
description: "Lint skips checks that would require to download and build the spec",
- is_string: false,
- default_value: false)
+ type: Boolean,
+ default_value: false,
+ env_name: "FL_POD_LIB_LINT_QUICK")
]
end
def self.output
end