diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/deploy.py.in (renamed from tools/deploy.py) | 11 | ||||
-rw-r--r-- | tools/meson.build | 8 |
2 files changed, 13 insertions, 6 deletions
diff --git a/tools/deploy.py b/tools/deploy.py.in index 26048e8..8eeecda 100755 --- a/tools/deploy.py +++ b/tools/deploy.py.in @@ -7,8 +7,8 @@ import pathlib SCRIPT = pathlib.Path(__file__) -SOURCE_ROOT = SCRIPT.parent.parent.resolve() -ARTIFACTS_DEFAULT = SOURCE_ROOT / "build" / "artifacts" +BUILD_ROOT = SCRIPT.parent.parent.resolve() +ARTIFACTS_DEFAULT = BUILD_ROOT / "@PROJECT_VERSION_STRING@.tar.zst" def main() -> None: @@ -20,7 +20,7 @@ def main() -> None: "-a", "--artifacts", default=ARTIFACTS_DEFAULT, - help="local path to artifacts folder", + help="local path to artifacts archive file", ) parser.add_argument( "-H", "--host", default="cloud", help="target `Host` name from ~/.ssh/config" @@ -28,7 +28,7 @@ def main() -> None: parser.add_argument( "-p", "--path", - default="/srv/http/deploy.xengineering.eu/public/git/iot-contact/main/", + default="/srv/http/deploy.xengineering.eu/public/git/iot-contact/", help="remote path to destination folder on server", ) parser.add_argument( @@ -43,8 +43,7 @@ def main() -> None: command = [ "rsync", "-av", - "--delete", - f"{str(pathlib.Path(args.artifacts).resolve())}/", + f"{str(pathlib.Path(args.artifacts).resolve())}", f"{args.host}:{args.path}", ] diff --git a/tools/meson.build b/tools/meson.build index f58c54b..2a33d0e 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -1,3 +1,11 @@ configure_zephyr = meson.current_source_dir() / 'configure_zephyr.py' build_zephyr = meson.current_source_dir() / 'build_zephyr.py' make_factory_image = meson.current_source_dir() / 'make_factory_image.py' + +configure_file( + configuration : { + 'PROJECT_VERSION_STRING': project_version_string, + }, + input : 'deploy.py.in', + output : 'deploy.py', +) |