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] carthage - add use_xcframeworks option #18090

Merged
merged 4 commits into from
Feb 8, 2021
Merged

[action] carthage - add use_xcframeworks option #18090

merged 4 commits into from
Feb 8, 2021

Conversation

att55
Copy link
Contributor

@att55 att55 commented Feb 2, 2021

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Description

Carthage has --use-xcframeworks option since ver.0.37.0.
So, I also added the option to CarthageAction.

https://github.com/Carthage/Carthage/releases/tag/0.37.0

@google-cla google-cla bot added the cla: yes label Feb 2, 2021
@att55 att55 changed the title [carthage] Add --use-xcframeworks option to carthage action [carthage] Add use_xcframeworks option Feb 2, 2021
Copy link
Contributor

@ainame ainame left a comment

Choose a reason for hiding this comment

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

This is same as #18077
Can you please add type and shrink test cases?

Comment on lines 703 to 734
context "when command is update" do
let(:command) { 'update' }

it "adds the use_xcframeworks option" do
result = Fastlane::FastFile.new.parse("lane :test do
carthage(command: '#{command}', use_xcframeworks: true)
end").runner.execute(:test)
expect(result).to eq("carthage update --use-xcframeworks")
end
end

context "when command is build" do
let(:command) { 'build' }

it "adds the use_xcframeworks option" do
result = Fastlane::FastFile.new.parse("lane :test do
carthage(command: '#{command}', use_xcframeworks: true)
end").runner.execute(:test)
expect(result).to eq("carthage build --use-xcframeworks")
end
end

context "when command is bootstrap" do
let(:command) { 'bootstrap' }

it "adds the use_xcframeworks option" do
result = Fastlane::FastFile.new.parse("lane :test do
carthage(command: '#{command}', use_xcframeworks: true)
end").runner.execute(:test)
expect(result).to eq("carthage bootstrap --use-xcframeworks")
end
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
context "when command is update" do
let(:command) { 'update' }
it "adds the use_xcframeworks option" do
result = Fastlane::FastFile.new.parse("lane :test do
carthage(command: '#{command}', use_xcframeworks: true)
end").runner.execute(:test)
expect(result).to eq("carthage update --use-xcframeworks")
end
end
context "when command is build" do
let(:command) { 'build' }
it "adds the use_xcframeworks option" do
result = Fastlane::FastFile.new.parse("lane :test do
carthage(command: '#{command}', use_xcframeworks: true)
end").runner.execute(:test)
expect(result).to eq("carthage build --use-xcframeworks")
end
end
context "when command is bootstrap" do
let(:command) { 'bootstrap' }
it "adds the use_xcframeworks option" do
result = Fastlane::FastFile.new.parse("lane :test do
carthage(command: '#{command}', use_xcframeworks: true)
end").runner.execute(:test)
expect(result).to eq("carthage bootstrap --use-xcframeworks")
end
end
context "when valid command is used for --use-xcframeworks option" do
it "adds the use_xcframeworks option" do
['update', 'build', 'bootstrap'].each do |command|
result = Fastlane::FastFile.new.parse("lane :test do
carthage(command: '#{command}', use_xcframeworks: true)
end").runner.execute(:test)
expect(result).to eq("carthage bootstrap --use-xcframeworks")
end
end
end

I think you can combine those cases into one case. Can you please do that?

Copy link
Contributor Author

@att55 att55 Feb 3, 2021

Choose a reason for hiding this comment

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

@ainame
Thanks for your review and suggestion!
But, I think the expectation should be like below.

expect(result).to eq("carthage #{command} --use-xcframeworks")

Except for that, I will take your suggestion in PR 👍

@att55
Copy link
Contributor Author

att55 commented Feb 3, 2021

@ainame Added type and combined test cases in one case 👍
Please check when you're available.

Copy link
Contributor

@ainame ainame left a comment

Choose a reason for hiding this comment

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

LGTM👍 @joshdholtz will double-check and merge this when he can 🙇

@ainame ainame requested a review from joshdholtz February 3, 2021 11:57
@att55
Copy link
Contributor Author

att55 commented Feb 3, 2021

@ainame
Copy link
Contributor

ainame commented Feb 3, 2021

It's a known flaky test case. Don't worry.

@joshdholtz joshdholtz changed the title [carthage] Add use_xcframeworks option [action] carthage - add use_xcframeworks option Feb 8, 2021
Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

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

Thanks again for another carthage addition! Really appreciate it ❤️

@joshdholtz joshdholtz merged commit 73dfd38 into fastlane:master Feb 8, 2021
@fastlane-bot
Copy link

Hey @att55 👋

Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a week, and your PR will be included in the next one.

Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀

@fastlane-bot
Copy link

Congratulations! 🎉 This was released as part of fastlane 2.174.0 🚀

@fastlane fastlane locked and limited conversation to collaborators Apr 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants