SERVER-104987 fix shfmt os name on macos (#36007)
GitOrigin-RevId: 883173aef3eed69a9f3e61d32984e06f23c6eea7
This commit is contained in:
parent
e21fa1be90
commit
da405b0248
@ -176,10 +176,6 @@ setup_pigz(
|
||||
name = "pigz",
|
||||
)
|
||||
|
||||
load("//bazel/format:shfmt.bzl", "shfmt")
|
||||
|
||||
shfmt()
|
||||
|
||||
# This repository is normally created by db-contrib-tool or manually extracting the binaries at the proper location
|
||||
new_local_repository(
|
||||
name = "mongot_localdev",
|
||||
@ -212,3 +208,7 @@ poetry(
|
||||
lockfile = "@bazel_rules_mongo//:poetry.lock",
|
||||
pyproject = "@bazel_rules_mongo//:pyproject.toml",
|
||||
)
|
||||
|
||||
load("//bazel/format:shfmt.bzl", "shfmt")
|
||||
|
||||
shfmt()
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
"""Repository rules for shfmt binary download"""
|
||||
|
||||
load("//bazel:utils.bzl", "retry_download")
|
||||
load("//bazel/platforms:normalize.bzl", "ARCH_TO_PLATFORM_MAP", "OS_TO_PLATFORM_MAP")
|
||||
load("@bazel_rules_mongo//utils:platforms_normalize.bzl", "ARCH_NORMALIZE_MAP", "OS_NORMALIZE_MAP")
|
||||
|
||||
URLS_MAP = {
|
||||
"linux_aarch64": {
|
||||
@ -33,8 +33,11 @@ def _shfmt_download(ctx):
|
||||
Args:
|
||||
ctx: Repository context.
|
||||
"""
|
||||
platform_info = URLS_MAP["{os}_{arch}".format(os = ctx.os.name, arch = ctx.os.arch)]
|
||||
print(platform_info)
|
||||
os = ctx.os.name
|
||||
arch = ctx.os.arch
|
||||
os_constraint = OS_NORMALIZE_MAP[os]
|
||||
arch_constraint = ARCH_NORMALIZE_MAP[arch]
|
||||
platform_info = URLS_MAP["{os}_{arch}".format(os = os_constraint, arch = arch_constraint)]
|
||||
ctx.report_progress("downloading shfmt")
|
||||
retry_download(
|
||||
ctx = ctx,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user