[CI-2849] Resolve env vars with xcodebuild #44
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
step.yml
andREADME.md
is updated with the changes (if needed)Version
Requires a PATCH version update
Context
When you create a new project the default setting for the Info.plist file in your build settings is a relative path from the project file. But this can be freely overridden by the user and for example we could have something like this there:
A value with an embedded env var which can be only resolved by Xcode. This is just one example as there are multiple Xcode env vars. The step needs to handle these cases as well.
The simplest solution is to check if the returned value contains an env var. If it does then use
xcodebuild -showBuildSettings
to list all of the build settings. When we are doing this then Xcode will resolve all of the env vars.I need to mention that this will be a fallback mechanism because this
xcodebuild
command can take a lot of time for larger projects.I have updated one of the e2e test projects to have it's Info.plist path defined with an env var.