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

Building both ios and android in a single fastlane run results in context clobbering #49

Open
machty opened this issue Jan 23, 2018 · 2 comments

Comments

@machty
Copy link

machty commented Jan 23, 2018

I have a private helper lane that accepts options, does some shared logic, and then calls out to aws_s3 with something that looks like:

  aws_s3(
    #...
    ipa: options[:ipa],
    apk: options[:apk],
    dsym: options[:dsym],
  )

This gets called multiple times in the course of one fastlane execution, but this causes issues if I'm building both ios and android in one execution, because ipa and apk get defaulted to Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] and Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] when passed in as nil, and I get an error telling me to pass ipa or apk, not both.

The solution for me was to add these lines of code before calling aws_s3

  # prevent fastlane from using stale values as default values
  Actions.lane_context[SharedValues::GRADLE_APK_OUTPUT_PATH] = nil
  Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] = nil

Not sure what to suggest as a fix, but at the very least it seems if I'm explicitly passing in values as nil (rather than omitting them), they shouldn't be replaced with their default values.

@JesseScott
Copy link

I think this is a larger Fastlane issue with lane context...

@revolter
Copy link
Collaborator

revolter commented Sep 6, 2018

Are you using separate platform blocks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants