From d256538f8155156158c5d927babe08d07055b57c Mon Sep 17 00:00:00 2001 From: holger krekel Date: Wed, 29 Apr 2026 20:07:21 +0200 Subject: [PATCH] testing: support custom filtermail binary through CHATMAIL_FILTERMAIL_BINARY env var --- cmdeploy/src/cmdeploy/filtermail/deployer.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cmdeploy/src/cmdeploy/filtermail/deployer.py b/cmdeploy/src/cmdeploy/filtermail/deployer.py index b9a09238..fed98ccf 100644 --- a/cmdeploy/src/cmdeploy/filtermail/deployer.py +++ b/cmdeploy/src/cmdeploy/filtermail/deployer.py @@ -1,3 +1,5 @@ +import os + from pyinfra import facts, host from pyinfra.operations import files, systemd @@ -13,6 +15,16 @@ class FiltermailDeployer(Deployer): self.need_restart = False def install(self): + local_bin = os.environ.get("CHATMAIL_FILTERMAIL_BINARY") + if local_bin: + self.need_restart |= files.put( + name="Upload locally built filtermail", + src=local_bin, + dest=self.bin_path, + mode="755", + ).changed + return + arch = host.get_fact(facts.server.Arch) url = f"https://github.com/chatmail/filtermail/releases/download/v0.6.1/filtermail-{arch}" sha256sum = {