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

[Carthage] Add option to pass in specific dependencies to update #5500

Merged
merged 3 commits into from
Jul 27, 2016
Merged

[Carthage] Add option to pass in specific dependencies to update #5500

merged 3 commits into from
Jul 27, 2016

Conversation

bfcrampton
Copy link
Contributor

@bfcrampton bfcrampton commented Jul 25, 2016

This enables the ability to pass in particular dependencies to carthage update, and closes #5499.

An optional array of strings can now be passed into the carthage command as such:

carthage(
      command: 'update',
      dependencies: ['Alamofire', 'Notice'],
)

This enables a lane in the Fastfile to update particular dependencies under different circumstances.

@@ -31,6 +36,10 @@ def self.available_platforms
end

def self.available_options
default_options + options
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was running into errors with the available_options size being too high on the Carthage class, so I simply split it into default_options, and options, which are concatenated in available_options. This is an okay workaround but maybe someone else has a better solution to abiding by the rubocop style enforcement?

Copy link
Member

Choose a reason for hiding this comment

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

I assume you're talking about a rubocop style error? If so so you can disable the bot for this method using
Run rubocop -D to get the cop name and add

# rubocop:disable [bot name here]
def ...
# rubocop:enable [bot name here]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@KrauseFx cool thanks for the tip! Fixed 6549812

FastlaneCore::ConfigItem.new(key: :dependencies,
description: "Carthage dependencies to update",
default_value: [],
is_string: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add type: Array, to the params for this ConfigItem. That should remove the need to manually verify the data type in the verify_block 👍

Copy link
Contributor

@mfurtak mfurtak Jul 27, 2016

Choose a reason for hiding this comment

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

Actually, we will take this as-is and do the change quickly on our end so that we can include it in today's release! 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Awesome thanks so much! 😄

@mfurtak
Copy link
Contributor

mfurtak commented Jul 27, 2016

Nice addition - thanks! 👍

@mfurtak mfurtak self-assigned this Jul 27, 2016
@mfurtak mfurtak merged commit 84237b8 into fastlane:master Jul 27, 2016
@bfcrampton bfcrampton deleted the bc/carthage-update-specific-dependencies branch July 27, 2016 17:56
asfalcone pushed a commit that referenced this pull request Jul 27, 2016
* Add the ability to specify a strategy for hockey action (#5514)
* Fixup carthage dependencies option to be Array type (#5522)
* [Carthage] Add option to pass in specific dependencies to update (#5500)
* [Carthage] Ignore platform option case (#5504)
* Remove initial confirmation prompt from init beta
* Add fields and tests for `init beta` (#5516)
* Checking the default team_id value in the Appfile. (#5478)
* Also check for a default value from the Appfile (#5465)
* [add_git_tag] Add commit option
* Update code signing URL across the fastlane code base (#5451)
@asfalcone asfalcone mentioned this pull request Jul 27, 2016
@fastlane fastlane locked and limited conversation to collaborators Feb 4, 2017
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.

Carthage update particular dependency / dependencies
3 participants