fix(packaging): prioritize standalone Linux_Client.bin binary over shell installer and add Hub auto-download fallback
CI Test Suite / Run Component Tests & Pipeline Verification (push) Successful in 1m46s

This commit is contained in:
2026-10-04 01:18:58 +02:00
parent f0f6eba53b
commit 41563a8fb8
2 changed files with 47 additions and 11 deletions
+13 -7
View File
@@ -199,8 +199,10 @@ class ServerUpdateManager:
os_dir = os.path.join(self.update_dir, os_name)
found_pkg = None
if os.path.exists(os_dir):
for f in os.listdir(os_dir):
if f.endswith((".exe", ".bin", ".zip", ".tar.gz", ".sh")) and not f.startswith("."):
# Search by priority: .bin/.exe first, then archives, never .sh
valid_exts = (".exe", ".msi", ".zip") if os_name == "windows" else (".bin", ".tar.gz", ".tgz")
for f in sorted(os.listdir(os_dir), key=lambda x: (not x.endswith((".exe", ".bin")), x)):
if f.endswith(valid_exts) and not f.startswith(".") and not f.endswith(".sh"):
found_pkg = os.path.join(os_dir, f)
break
@@ -209,9 +211,9 @@ class ServerUpdateManager:
dist_dir = os.path.join(os.path.dirname(self.update_dir), "dist")
if os.path.exists(dist_dir):
patterns = [
"LOGAR_Client_Setup.exe", "LOGAR_Client.exe", "Win_Client.exe"
"LOGAR_Client_Setup.exe", "LOGAR-Client-Setup.exe", "Win_Client.exe", "LOGAR_Client.exe", "LOGAR-Windows-Client.zip"
] if os_name == "windows" else [
"Linux_Client.bin", "LOGAR_Client_Linux", "install_linux_client.sh"
"Linux_Client.bin", "Linux_Client", "LOGAR_Client_Linux", "LOGAR-Linux-Client.tar.gz"
]
for pat in patterns:
candidate = os.path.join(dist_dir, pat)
@@ -329,13 +331,17 @@ class ServerUpdateManager:
for asset in release_assets:
name = (asset.get("name") or "").lower()
download_url = asset.get("download_url")
if not download_url:
if not download_url or name.endswith(".sh") or "server" in name or "checksum" in name or "sha256" in name:
continue
target_os = None
if ("win" in name or name.endswith(".exe") or "setup" in name) and not results["windows"]:
if ("win" in name or "setup" in name or name.endswith((".exe", ".msi", ".zip"))) and "client" in name and not results["windows"]:
target_os = "windows"
elif ("linux" in name or name.endswith((".bin", ".sh")) or "client_linux" in name) and not results["linux"]:
elif ("win" in name or name.endswith(".exe")) and not results["windows"]:
target_os = "windows"
elif ("linux" in name or name.endswith((".bin", ".tar.gz", ".tgz"))) and ("client" in name or "agent" in name) and not results["linux"]:
target_os = "linux"
elif name in ("linux_client.bin", "linux_client", "logar_client_linux") and not results["linux"]:
target_os = "linux"
if not target_os: