From 8c7230ab7bf5a8edf8312242660f8479dac26c8d Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Wed, 16 Oct 2024 22:22:16 +1000 Subject: [PATCH] tasks.py: fix darwin/nixos deploy --- tasks.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tasks.py b/tasks.py index a909b4d..83f74bc 100644 --- a/tasks.py +++ b/tasks.py @@ -112,13 +112,16 @@ def docs_linkcheck(c: Any) -> None: def get_hosts(hosts: str) -> List[DeployHost]: - if "darwin" in hosts: - return [ - DeployHost(f"{h}.nix-community.org", user="customer") - for h in hosts.split(",") - ] + deploy_hosts = [] + for host in hosts.split(","): + if host.startswith("darwin"): + deploy_hosts.append( + DeployHost(f"{host}.nix-community.org", user="customer") + ) + else: + deploy_hosts.append(DeployHost(f"{host}.nix-community.org")) - return [DeployHost(f"{h}.nix-community.org") for h in hosts.split(",")] + return deploy_hosts def decrypt_host_key(flake_attr: str, tmpdir: str) -> None: