[supply] only set apk path when none is given #8256

Open
wants to merge 1 commit into
from

Projects

None yet

2 participants

@koenpunt
Contributor
koenpunt commented Feb 15, 2017 edited

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

only set apk path when none is given

Motivation and Context

User options should always have precedence, and if for some reason multiple apks are generated, it should still be possible to only use one.

@koenpunt koenpunt [supply] only set apk path when none is given
User options should always have precedence, and if for some reason multiple apks are generated, it should still be possible to only use one.
e47266a
@lacostej

@koenpunt do you think you could try adding some tests?

- params[:apk_paths] ||= all_apk_paths
- else
- params[:apk] ||= Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]
+ unless params[:apk_paths].present? || params[:apk].present?
@lacostej
lacostej Feb 16, 2017 Contributor

I think the change is OK, but we should really consider

  • adding tests. There are too many ways to set up the paths.
  • go towards removing the use of params[:apk] at least internally. For example we could do something like
params[: apk_paths] = [ Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] ] if Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment