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

[match] Correct how match handles enterprise adhoc #12281

Merged
merged 3 commits into from Apr 17, 2018

Conversation

joshdholtz
Copy link
Member

@joshdholtz joshdholtz commented Apr 10, 2018

Fixes #11139
Fixes #12133

Da motivation

I have experience this issue while (as well as others) where match doesn't treat adhoc profiles for enterprise accounts the way it is expected.

❌ Before

  • match would place certificates for enterprise adhoc accounts under distribution
    • This meant that match wouldn't reuse the same cert used for inhouse which was placed under enterprise
  • sigh would also look for enterprise adhoc files in Spaceship.certificate.production.all when actually in Spaceship.certificate.in_house.all

✅ After

  • match looks for both enterprise adhoc and inhouse certs under the enterprise directory
    • Which now means the one certificate can be shared for all enterprise distribution builds
  • sigh now properly returns certificates for enterprise adhoc profiles

⚠️ Warning

  • This may introduce some backwards compatibility issues 🤔
    • match will now look for the adhoc cert in the enterprise directory instead of distribution
    • This shouldn't "break" anything but will make the other certificate just useless

@logancautrell
Copy link

Thank you for getting a fix up for this :)

Copy link
Member

@KrauseFx KrauseFx left a comment

Choose a reason for hiding this comment

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

Haven't tried it, but code looks 👍

@joshdholtz joshdholtz merged commit d0c3b3f into master Apr 17, 2018
@joshdholtz joshdholtz deleted the joshdholtz-match-enterprise-adhoc-improvements branch April 17, 2018 00:13
@wanyakun
Copy link

wanyakun commented Apr 17, 2018

After i update fastlane to version 2.92.0, when i use match sync the adhoc certificates got the error as follow:
undefined method `in_house?' for nil:NilClass.

As you said match will now look for the adhoc cert in the enterprise directory instead of distribution.

But in my git project there is no enterprise directory, and my apple account is not enterprise. So it won't create enterprise directory.

  def self.cert_type_sym(type)
    return :enterprise if type == "enterprise" || (type == "adhoc" && Spaceship.client.in_house?)
    return :development if type == "development"
    return :distribution if ["adhoc", "appstore", "distribution"].include?(type)
    raise "Unknown cert type: '#{type}'"
  end

Then i found the in_house method is not in the client.rb file and it is in the portal_base.rb file.

@arthuryeti
Copy link

Same as you @wanyakun. Do you guys have an idea?

@Steveybrown
Copy link

Steveybrown commented Apr 17, 2018

As a temp solution, I downgraded back to 2.91.0

Gemfile
gem "fastlane", '2.91.0'

@wanyakun
Copy link

wanyakun commented Apr 17, 2018

@ATU i remove this line return :enterprise if type == "enterprise" || (type == "adhoc" && Spaceship.client.in_house?) in method cert_type_sym for the moment. Or downgraded back to 2.91.0 as @Steveybrown

@joshdholtz
Copy link
Member Author

Hey everyone! Sorry about this. Going to revert it 😬

joshdholtz pushed a commit that referenced this pull request Apr 17, 2018
* Revert "Version bump to 2.92.0 (#12323)"

This reverts commit df64e77.

* Revert "Don't allow spaces in IPA file name being uploaded to ITC (#12321)"

This reverts commit 61a16a2.

* Revert "[match] Correct how match handles enterprise adhoc (#12281)"

This reverts commit d0c3b3f.
@joshdholtz
Copy link
Member Author

Reverted this PR and making new version for 2.92.1

@fastlane-bot
Copy link

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

@fastlane fastlane locked and limited conversation to collaborators Jun 17, 2018
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.

None yet

8 participants