-
Notifications
You must be signed in to change notification settings - Fork 25
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
Make team id a local configuration #59
base: main
Are you sure you want to change the base?
Conversation
Developers have to change the team ids in order to build and then have to remember to revert these changes before submitting a PR. This moves the definition of DEVELOPMENT_TEAM into a config file that is gitignored. A bootstrap script is provided to make getting set up easier.
|
||
Configurations/TeamID.xcconfig |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, we definitely want to default to the team ID being populated so that our internal teams do not need to redundantly enter own team ID every time.
Can we move the development team configuration to a configuration file so that it can be configured from one place? And then just offer instructions on how to clear it or change it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be a one-time thing per checkout. The main thing (for me and other non-Shopify contributors) is that we will perpetually need to dirty this file.
We could perhaps have an Xcode pre-build step check for the file and it doesn't exist, seed it with the Shopify team id. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we had a third build configuration for external contributions (inheriting from Debug settings), that referenced a separate ignored xcconfig
file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no way (that I know of) to conditionally include an xcconfig file if it exists. So this would end up causing a build error and you'd have to create the file manually (or via a script)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's kind of what I was thinking. Would it be okay to produce an error until the file is created? That would only need to be done once, right?
I'm open to ideas but I'd like to prioritize a no-setup experience for internal contributors.
bootstrap.sh is now setup_team.sh and can take a 'default' argument. Xcode will call this script if the xcconfig file is not present on disk, making it a zero-setup process for internal contributors. External contributors will need to run setup_team.sh once to set up their own team id.
Hi @lfroms, did you have a chance to review this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @subdigital! I was out of office.
I'm liking the direction, but could we avoid removing the defaults from the project files and instead use a script to assign empty values in an xcconfig
for external contributors? This way no action is required for internal contributors, and external contributors only need to run one script to prepare the project. Should remove the need for an extra script action as well.
What does this change accomplish?
Developers have to change the team ids in order to build in Xcode and then have to remember to revert these changes before submitting a PR. This moves the definition of
DEVELOPMENT_TEAM
into a config file that is gitignored.A bootstrap script is provided to make getting set up easier.
How can the change be tested?
Checkout this branch
Run
./setup_team.sh
Build in Xcode
For internal developers, just Build with Xcode and it will populate the file for you with Shopify's Team ID.