fix: ensure the xcodeproj project generation uses the correct Bazel binary in the firebase_example
#1401
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.
The
rules_xcodeproj
project generator calls Bazel. By default, it looks forbazel
on thePATH
. When running underrules_bazel_integration_test
this will pick up the default Bazel version on the system. If that is Bazelisk, it will pull down the latest Bazel. The fix is to explicitly tellxcodeproj
which Bazel binary to use.tools/bazel
to thefirebase_example
. It inspects environment variables to determine the Bazel version to use and writestools/bazel_for_xcodeproj
which executes Bazel commands against the correct Bazel binary.sanbox
forrules_xcodeproj
builds in firebase example. This avoids the duplicate definition error.print_and_run
bash function toexamples/firebase_example/do_test
to ease debugging future issues.