Skip to content

Commit

Permalink
run-crate: Always use x64 tarballs for mac
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mfussenegger committed Oct 7, 2024
1 parent 3cd6a9a commit b241540
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions cr8/run_crate.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,26 @@ class ReleaseUrlSegments(NamedTuple):
@classmethod
def create(cls):
extension = 'tar.gz'

machine = platform.machine()
if machine.startswith('arm'):
arch = 'aarch64'
else:
arch = 'x64'

if sys.platform.startswith('linux'):
os = 'linux'
elif sys.platform.startswith('win32'):
os = 'windows'
extension = 'zip'
elif sys.platform.startswith('darwin'):
os = 'mac'
else:
raise ValueError(f'Unsupported platform: {sys.platform}')

machine = platform.machine()
if machine.startswith('arm'):
arch = 'aarch64'
else:
# there are no aarch64/arm64 distributions available
# x64 should work via emulation layer
arch = 'x64'
else:
raise ValueError(f'Unsupported platform: {sys.platform}')

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

Expand Down

0 comments on commit b241540

Please sign in to comment.