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

Fix download_dsyms.rb ‘latest’ #10337

Merged
merged 2 commits into from
Sep 18, 2017
Merged

Conversation

humblehacker
Copy link
Contributor

@humblehacker humblehacker commented Sep 15, 2017

When version is set to latest, the following changes apply
• choose the edit version before the live version, since the edit version will be newer
• nil out version since AppVersion.version will not necessarily match any version in a BuildTrain
• return immediately if a build_number is found, since there will only be one dSYM for a given build number

Closes #10255

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.

Motivation and Context

Description

When `version` is set to `latest`, the following changes apply
• choose the edit version before the live version, since the edit version will be newer
• nil out `version` since `AppVersion.version` will not necessarily match any version in a `BuildTrain`
• return immediately if a `build_number` is found, since there will only be one dSYM for a given build number

Closes fastlane#10255
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If your company signed a CLA, they designated a Point of Contact who decides which employees are authorized to participate. You may need to contact the Point of Contact for your company and ask to be added to the group of authorized contributors. If you don't know who your Point of Contact is, direct the project maintainer to go/cla#troubleshoot.
  • In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again.

• replace a `return` with a `break`
• extract method `write_dsym` to reduce complexity
@humblehacker
Copy link
Contributor Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@humblehacker
Copy link
Contributor Author

I'm unable to run rspec tests due to issue #9177

version = latest_version.version
# Try to grab the edit version first, else fallback to live version
latest_version = app.edit_version(platform: platform) || app.live_version(platform: platform)
version = nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason for setting this to nil?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the reason is in my commit message:

nil out version since AppVersion.version will not necessarily match any version in a BuildTrain

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just in case that's not clear, if I understand correctly, AppVersion.version corresponds with the version number set in iTunes Connect, which is user settable and does not have to match the version number in the IPA. For example, for necessary but irrelevant reasons, our versions are 6.12 and 1006.12.

Copy link
Contributor

@ohayon ohayon left a comment

Choose a reason for hiding this comment

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

Thanks for this @humblehacker !! Welcome to the fastlane community 🚀 !

@ohayon ohayon merged commit 22abe0f into fastlane:master Sep 18, 2017
@fastlane-bot
Copy link

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

@fastlane fastlane locked and limited conversation to collaborators Nov 18, 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.

dowload_dsyms with version: 'latest' does not download from the latest version
4 participants