Fix arm64 packages contain 32-bit executable (#3246)

This commit is contained in:
Daniel Nelson 2017-09-18 14:22:54 -07:00 committed by GitHub
parent 0339dc7faf
commit b8e134cd37
1 changed files with 4 additions and 0 deletions

View File

@ -274,6 +274,8 @@ def get_system_arch():
arch = "amd64" arch = "amd64"
elif arch == "386": elif arch == "386":
arch = "i386" arch = "i386"
elif "arm64" in arch:
arch = "arm64"
elif 'arm' in arch: elif 'arm' in arch:
# Prevent uname from reporting full ARM arch (eg 'armv7l') # Prevent uname from reporting full ARM arch (eg 'armv7l')
arch = "arm" arch = "arm"
@ -446,6 +448,8 @@ def build(version=None,
# Handle variations in architecture output # Handle variations in architecture output
if arch == "i386" or arch == "i686": if arch == "i386" or arch == "i686":
arch = "386" arch = "386"
elif "arm64" in arch:
arch = "arm64"
elif "arm" in arch: elif "arm" in arch:
arch = "arm" arch = "arm"
build_command += "GOOS={} GOARCH={} ".format(platform, arch) build_command += "GOOS={} GOARCH={} ".format(platform, arch)