Skip to content

Commit 7cffd1d

Browse files
authored
feature: Upload and update package api (#113)
* feature: Upload and update package api * Clean up build to not be so verbose * Check for docker
1 parent 6b1e204 commit 7cffd1d

File tree

3 files changed

+174
-279
lines changed

3 files changed

+174
-279
lines changed

synapse-api

synapse/cli/build.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ def build_deb_package(app_dir: str, app_name: str, version: str = "0.1.0") -> bo
340340
image_tag,
341341
"/bin/bash",
342342
"-c",
343-
"find /usr/lib -name 'libsynapse*.so*' -exec cp -av {} /out/ \\;",
343+
"find /usr/lib -name 'libsynapse*.so*' -exec cp -a {} /out/ \\;",
344344
]
345345

346346
subprocess.run(docker_cmd, check=True)
@@ -398,7 +398,9 @@ def build_deb_package(app_dir: str, app_name: str, version: str = "0.1.0") -> bo
398398
fpm_cmd.append(".")
399399

400400
fpm_image = "cdrx/fpm-ubuntu:latest"
401-
console.print(f"[yellow]Running FPM (Docker image: {fpm_image}) ...[/yellow]")
401+
console.print(
402+
f"[yellow]Packaging App for Synapse Device (Docker image: {fpm_image}) ...[/yellow]"
403+
)
402404

403405
# Replace host-specific staging dir with container mount path
404406
fpm_args = fpm_cmd[1:]
@@ -424,7 +426,13 @@ def build_deb_package(app_dir: str, app_name: str, version: str = "0.1.0") -> bo
424426
"fpm",
425427
] + fpm_args
426428

427-
subprocess.run(docker_fpm_cmd, check=True)
429+
subprocess.run(
430+
docker_fpm_cmd,
431+
check=True,
432+
stdout=subprocess.PIPE,
433+
stderr=subprocess.PIPE,
434+
text=True,
435+
)
428436

429437
# Verify that a .deb was produced
430438
deb_files = [

0 commit comments

Comments
 (0)