-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Conversation
There was a problem hiding this 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?
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
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 👍
@ainame Added type and combined test cases in one case 👍 |
There was a problem hiding this 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 It seems like one job is failed. |
It's a known flaky test case. Don't worry. |
There was a problem hiding this 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 ❤️
Hey @att55 👋 Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉 Please let us know if this change requires an immediate release by adding a comment here 👍 |
Congratulations! 🎉 This was released as part of fastlane 2.174.0 🚀 |
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validDescription
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