Skip to content

Commit

Permalink
Use repo_mappings file for bzlmod legacy_xcodeproj
Browse files Browse the repository at this point in the history
  • Loading branch information
luispadron committed Jun 26, 2023
1 parent 51b873d commit 49db6b4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/xcodeproj_shims/xcodeproj-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ chmod -R +w "${tmp_dest}"
# if installing into the root of the workspace, remove the path entry entirely
sed -i.bak -E -e 's|^([[:space:]]*path = )../../..;$|\1.;|g' "${tmp_dest}/project.pbxproj"
# always trim three ../ from path, since that's "bazel-out/darwin-fastbuild/bin"
sed -i.bak -E -e 's|([ "])../../../|\1|g' "${tmp_dest}/project.pbxproj"

# Parse repo_mappings file to get the worksapce name:
# Example: ,build_bazel_rules_ios,_main
sed -i.bak 's/BAZEL_BUILD_TARGET_WORKSPACE = _main;/BAZEL_BUILD_TARGET_WORKSPACE = build_bazel_rules_ios;/g' "${tmp_dest}/project.pbxproj"
rm "${tmp_dest}/project.pbxproj.bak"

if [[ -d $dest ]]; then
Expand Down

0 comments on commit 49db6b4

Please sign in to comment.