Missed change in 5ea3bf3a9d

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2024-01-16 17:41:00 +00:00 committed by Daniel Wozniak
parent 96d60f3a11
commit 2316440b32
4 changed files with 13 additions and 7 deletions

View file

@ -486,7 +486,10 @@ def onedir_dependencies(
assert package_name is not None
assert platform is not None
if platform not in ("macos", "darwin") and arch == "arm64":
if platform == "darwin":
platform = "macos"
if platform != "macos" and arch == "arm64":
arch = "aarch64"
shared_constants = _get_shared_constants()
@ -625,6 +628,9 @@ def salt_onedir(
assert platform is not None
assert package_name is not None
if platform == "darwin":
platform = "macos"
shared_constants = _get_shared_constants()
if not relenv_version:
relenv_version = shared_constants["relenv_version"]
@ -706,7 +712,7 @@ def salt_onedir(
str(salt_archive),
env=env,
)
if platform == "darwin":
if platform == "macos":
def errfn(fn, path, err):
ctx.info(f"Removing {path} failed: {err}")

View file

@ -904,7 +904,7 @@ def _create_onedir_based_repo(
if distro == "onedir":
if "-onedir-linux-" in dpath.name.lower():
release_os = "linux"
elif "-onedir-darwin-" in dpath.name.lower():
elif "-onedir-macos-" in dpath.name.lower():
release_os = "macos"
elif "-onedir-windows-" in dpath.name.lower():
release_os = "windows"

View file

@ -131,13 +131,13 @@ def download_onedir_artifact(
Download onedir artifact from staging bucket.
"""
s3 = boto3.client("s3")
if platform == "macos":
platform = "darwin"
if platform == "darwin":
platform = "macos"
if arch == "arm64":
arch = "aarch64"
arch = arch.lower()
platform = platform.lower()
if platform in ("linux", "darwin") and arch not in ("x86_64", "aarch64"):
if platform in ("linux", "macos") and arch not in ("x86_64", "aarch64"):
ctx.error(
f"The 'arch' value for {platform} must be one of: 'x86_64', 'aarch64', 'arm64'"
)

View file

@ -38,7 +38,7 @@ download = command_group(
},
"platform": {
"help": "The onedir platform artifact to download",
"choices": ("linux", "darwin", "windows"),
"choices": ("linux", "macos", "windows"),
"required": True,
},
"arch": {