summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2025-07-25 22:38:51 +0200
committerxengineering <me@xengineering.eu>2025-07-25 22:38:51 +0200
commitdb83efd4d439ecd100c9b2400c00a68597444d89 (patch)
treefd232cb49a437d71bbd58f7c8661a48d7225297b
parentd3e7f19f1f87b03e9a7c8a170b9c4351ac565268 (diff)
downloadiot-contact-db83efd4d439ecd100c9b2400c00a68597444d89.tar
iot-contact-db83efd4d439ecd100c9b2400c00a68597444d89.tar.zst
iot-contact-db83efd4d439ecd100c9b2400c00a68597444d89.zip
tools: Remove deploy.py
This prepares switching to deployment with only a single archive file. The deploy script will be re-written as soon as this transition is complete.
-rwxr-xr-xtools/deploy.py58
1 files changed, 0 insertions, 58 deletions
diff --git a/tools/deploy.py b/tools/deploy.py
deleted file mode 100755
index 26048e8..0000000
--- a/tools/deploy.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env python3
-
-
-import argparse
-import subprocess
-import pathlib
-
-
-SCRIPT = pathlib.Path(__file__)
-SOURCE_ROOT = SCRIPT.parent.parent.resolve()
-ARTIFACTS_DEFAULT = SOURCE_ROOT / "build" / "artifacts"
-
-
-def main() -> None:
- parser = argparse.ArgumentParser(
- description="Use OpenSSH and rsync to deploy artifacts",
- )
-
- parser.add_argument(
- "-a",
- "--artifacts",
- default=ARTIFACTS_DEFAULT,
- help="local path to artifacts folder",
- )
- parser.add_argument(
- "-H", "--host", default="cloud", help="target `Host` name from ~/.ssh/config"
- )
- parser.add_argument(
- "-p",
- "--path",
- default="/srv/http/deploy.xengineering.eu/public/git/iot-contact/main/",
- help="remote path to destination folder on server",
- )
- parser.add_argument(
- "-d",
- "--dry-run",
- action="store_true",
- help="do not execute command and instead print it",
- )
-
- args = parser.parse_args()
-
- command = [
- "rsync",
- "-av",
- "--delete",
- f"{str(pathlib.Path(args.artifacts).resolve())}/",
- f"{args.host}:{args.path}",
- ]
-
- if args.dry_run:
- print(command)
- else:
- subprocess.run(command, shell=False, check=True)
-
-
-if __name__ == "__main__":
- main()