summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2025-04-11 17:51:44 +0200
committerxengineering <me@xengineering.eu>2025-04-11 17:51:44 +0200
commitd9a9ea56e6b733a6b054e662d5d4b0ce015a219c (patch)
tree7d81d75ede04f9a657b87bf10c61d56c6c3677b2
parentacf453677e7e39c568c02189e9906d05a19c6dfa (diff)
downloadiot-contact-d9a9ea56e6b733a6b054e662d5d4b0ce015a219c.tar
iot-contact-d9a9ea56e6b733a6b054e662d5d4b0ce015a219c.tar.zst
iot-contact-d9a9ea56e6b733a6b054e662d5d4b0ce015a219c.zip
tools: deploy.py: Add default for artifacts
This allows to call `deploy.py` without any arguments in most cases.
-rwxr-xr-xtools/deploy.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/deploy.py b/tools/deploy.py
index 84e1c6a..26048e8 100755
--- a/tools/deploy.py
+++ b/tools/deploy.py
@@ -6,13 +6,21 @@ 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", required=True, help="local path to artifacts folder"
+ "-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"