Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions xcodeproj/internal/templates/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,12 @@ else
xcode_version=""
fi

touch "$pre_xcodeproj_bazelrc_dir/pre_xcodeproj.bazelrc"

# We write to a `.bazelrc` file instead of passing flags directly in order to
# support all Bazel commands via the `common` pseudo-command
if [[ -n "$xcode_version" ]]; then
cat <<EOF > "$pre_xcodeproj_bazelrc_dir/pre_xcodeproj.bazelrc"
cat <<EOF >> "$pre_xcodeproj_bazelrc_dir/pre_xcodeproj.bazelrc"
# Be explicit about our desired Xcode version
common:rules_xcodeproj --xcode_version=$xcode_version

Expand All @@ -194,7 +196,7 @@ EOF
fi

if [[ -n "$developer_dir" ]]; then
cat <<EOF>> "$pre_xcodeproj_bazelrc_dir/pre_xcodeproj.bazelrc"
cat <<EOF >> "$pre_xcodeproj_bazelrc_dir/pre_xcodeproj.bazelrc"

# Set \`DEVELOPER_DIR\` in case a bazel wrapper filters it
common:rules_xcodeproj --repo_env="DEVELOPER_DIR=$developer_dir"
Expand Down