Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 39543d9

Browse files
committed
run-crate: Always use x64 tarballs for mac
There are no aarch64/arm64 distributions for CrateDB for Mac, so this changes the URL pattern to use the x64 version instead which should work via the emulation layer
1 parent 3cd6a9a commit 39543d9

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

cr8/run_crate.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,26 @@ class ReleaseUrlSegments(NamedTuple):
5858
@classmethod
5959
def create(cls):
6060
extension = 'tar.gz'
61+
62+
machine = platform.machine()
63+
if machine.startswith('arm'):
64+
arch = 'aarch64'
65+
else:
66+
arch = 'x64'
67+
6168
if sys.platform.startswith('linux'):
6269
os = 'linux'
6370
elif sys.platform.startswith('win32'):
6471
os = 'windows'
6572
extension = 'zip'
6673
elif sys.platform.startswith('darwin'):
6774
os = 'mac'
68-
else:
69-
raise ValueError(f'Unsupported platform: {sys.platform}')
7075

71-
machine = platform.machine()
72-
if machine.startswith('arm'):
73-
arch = 'aarch64'
74-
else:
76+
# there are no aarch64/arm64 distributions available
77+
# x64 should work via emulation layer
7578
arch = 'x64'
79+
else:
80+
raise ValueError(f'Unsupported platform: {sys.platform}')
7681

7782
return ReleaseUrlSegments(arch=arch, os=os, extension=extension)
7883

0 commit comments

Comments
 (0)