Skip to content

Commit feeb7db

Browse files
authored
Support xcarchive on MacOS (#2758)
Resolves issue on zipped ".app" targets for MacOS, and resolves issue: ``` ERROR: /Users/marek/source-code/ledger/BUILD:11:18: XCArchive ledger/Ledger.xcarchive failed: (Exit 1): make_xcarchive failed: error executing XCArchive command (from target //ledger:archive) bazel-out/darwin_arm64-opt-exec-ST-d57f47055a04/bin/external/rules_apple+/tools/xcarchivetool/make_xcarchive --info_plist ... (remaining 5 arguments skipped) Traceback (most recent call last): File "/private/var/tmp/_bazel_marek/2449a56c93ddd6c135146dab9dca5580/execroot/_main/bazel-out/darwin_arm64-opt-exec-ST-d57f47055a04/bin/external/rules_apple+/tools/xcarchivetool/make_xcarchive.runfiles/_main/../rules_apple+/tools/xcarchivetool/make_xcarchive.py", line 193, in <module> _main( File "/private/var/tmp/_bazel_marek/2449a56c93ddd6c135146dab9dca5580/execroot/_main/bazel-out/darwin_arm64-opt-exec-ST-d57f47055a04/bin/external/rules_apple+/tools/xcarchivetool/make_xcarchive.runfiles/_main/../rules_apple+/tools/xcarchivetool/make_xcarchive.py", line 140, in _main shutil.copytree( File "/private/var/tmp/_bazel_marek/2449a56c93ddd6c135146dab9dca5580/external/rules_python++python+python_3_11_aarch64-apple-darwin/lib/python3.11/shutil.py", line 571, in copytree with os.scandir(src) as itr: ^^^^^^^^^^^^^^^ NotADirectoryError: [Errno 20] Not a directory: 'bazel-out/darwin_arm64-fastbuild-macos-arm64-min14.0-applebin_macos-ST-a610dfc02e27/bin/ledger/ledger.zip' ```
1 parent 385c9e5 commit feeb7db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/xcarchivetool/make_xcarchive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def _main(
130130

131131
# If is an .ipa, extract and copy .app to destination
132132
# Else Copy the archive contents to the destination.
133-
if bundle_path.suffix == ".ipa":
133+
if bundle_path.suffix in [".ipa", ".zip"]:
134134
_extract_app_from_ipa(bundle_path, bundle_dest_path)
135135
else:
136136
shutil.copytree(bundle_path, bundle_dest_path,

0 commit comments

Comments
 (0)