diff --git a/buf/internal/toolchain.bzl b/buf/internal/toolchain.bzl index 9b724d7..15e691c 100644 --- a/buf/internal/toolchain.bzl +++ b/buf/internal/toolchain.bzl @@ -119,7 +119,7 @@ def _buf_download_releases_impl(ctx): major_version = int(version_number[0]) minor_version = int(version_number[1]) os, cpu = _detect_host_platform(ctx) - if os not in ["linux", "darwin", "windows"] or cpu not in ["arm64", "amd64", "ppc64le"]: + if os not in ["linux", "darwin", "windows"] or cpu not in ["arm64", "amd64", "ppc64le", "s390x"]: fail("Unsupported operating system or cpu architecture ") if os == "linux" and cpu == "arm64": cpu = "aarch64" @@ -127,6 +127,8 @@ def _buf_download_releases_impl(ctx): cpu = "x86_64" if cpu == "ppc64le" and (major_version < 1 or (major_version == 1 and minor_version < 54)): fail("Unsupported operating system or cpu architecture ") + if cpu == "s390x" and (major_version < 1 or (major_version == 1 and minor_version < 56)): + fail("Unsupported operating system or cpu architecture ") ctx.report_progress("Downloading buf release hash") url = "{}/{}/sha256.txt".format(repository_url, version)