[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[action][pod_lib_lint] add "configuration" option #19582

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion fastlane/lib/fastlane/actions/pod_lib_lint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def self.run(params)
command << "--skip-import-validation" if params[:skip_import_validation]
command << "--skip-tests" if params[:skip_tests]
command << "--analyze" if params[:analyze]
command << "--configuration=#{params[:configuration]}" if params[:configuration]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if a configuration has a space in the name? 🤔

I'm thinking maybe we need to either wrap this in quotes or call .shellescape on it? Thoughts?


result = Actions.sh(command.join(' '))
UI.success("Pod lib lint Successfully ⬆️ ")
Expand Down Expand Up @@ -150,7 +151,12 @@ def self.available_options
description: "Validate with the Xcode Static Analysis tool (available since cocoapods >= 1.6.1)",
type: Boolean,
default_value: false,
env_name: "FL_POD_LIB_LINT_ANALYZE")
env_name: "FL_POD_LIB_LINT_ANALYZE"),
FastlaneCore::ConfigItem.new(key: :configuration,
description: "Build using the given configuration (if not provided, configuration defaults to Release)",
type: String,
optional: true,
env_name: "FL_POD_LIB_LINT_CONFIGURATION")
]
end

Expand Down
8 changes: 8 additions & 0 deletions fastlane/spec/actions_specs/pod_lib_lint_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@

expect(result).to eq("bundle exec pod lib lint --analyze")
end

it "generates the correct pod lib lint command with configuration parameter" do
result = Fastlane::FastFile.new.parse("lane :test do
pod_lib_lint(configuration: 'Debug')
end").runner.execute(:test)

expect(result).to eq("bundle exec pod lib lint --configuration=Debug")
end
end
end
end