-
Notifications
You must be signed in to change notification settings - Fork 458
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
[XCBuildConfiguration] Support environment variables in #resolve_build_setting #510
[XCBuildConfiguration] Support environment variables in #resolve_build_setting #510
Conversation
612d6d9
to
dc9936f
Compare
Absolutely awesome!
Output from sample project What I did not test if it works fastlane and the chosen xcode scheme. Schemes can have environment variables added on each scheme. |
This won't address the scheme use case, but I believe as far as Xcodeproj goes, this is good enough for build settings resolution. Xcodeproj doesn't know about the scheme you're trying to use, so it's up to fastlane to read that scheme and set up the build environment with those variables before attempting to resolve build settings. @segiddins what do you think of this? |
@Ruenzuo thought as much 👍 I'll test it and create an issue with fastlane if there's a issue once this is released. Still somewhat baffled how simple the change was. 💯 |
@dantoml Could we have a release with this, pretty please 👍 |
@target.resolved_build_setting('TARGET_REFERENCE_ENVIRONMENT', true).should == { 'Release' => 'ENVIRONMENT_VARIABLE_VALUE', 'Debug' => 'ENVIRONMENT_VARIABLE_VALUE' } | ||
end | ||
|
||
it 'returns the resolved build setting considering environment variables' do |
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 test has the same name as the one above
@Ruenzuo can you also rebase? |
I'm not 100% sure that this is something we should support in Xcodeproj, as it introduces a discrepancy between what gets resolved in ruby, and the model of the project. |
Most Xcodeproj build settings have distinct names to not conflict with any unintended environment variables. |
@Casz I'm not so worried about accidental conflict, as I am in adding discrepancies between what is resolved in Xcodeproj as is in the model and project itself. |
dc9936f
to
6dcc93e
Compare
@dantoml I guess it all depends on what do we want to get from the API. Currently it reads:
You can always use |
Any plans on merging this? |
@Ruenzuo can you rebase this PR please? |
6dcc93e
to
3649a63
Compare
@dnkoutso rebased |
@dantoml any objections of merging this? Seems you had some initial concerns to land this. |
@Ruenzuo one more rebase please and we can land this sorry, can you please fix the |
ping @Ruenzuo one more time |
3649a63
to
3a78d3e
Compare
3a78d3e
to
8201391
Compare
@dnkoutso rebased |
@Ruenzuo thanks! |
This should address #508.