diff --git a/README.rst b/README.rst index a21acb3fe..da1046b03 100644 --- a/README.rst +++ b/README.rst @@ -9,6 +9,7 @@ generating IOC Instances from those Generic IOCs at container runtime. It is targetted at running IOCs in Kubernetes, but the images it creates can execute in any container runtime, such as docker or podman. + ============== ============================================================== PyPI ``pip install ibek`` Source code https://github.com/epics-containers/ibek diff --git a/src/ibek/ioc_cmds/assets.py b/src/ibek/ioc_cmds/assets.py index a2544f6fa..faeb8928b 100644 --- a/src/ibek/ioc_cmds/assets.py +++ b/src/ibek/ioc_cmds/assets.py @@ -64,14 +64,31 @@ def extract_assets( GLOBALS.IBEK_DEFS, IOC_FOLDER, # get the IOC folder symlink Path.readlink(IOC_FOLDER), # get contents of IOC folder - ] + Path("/venv"), # get the virtualenv + ] + list( + source.glob("ibek*") + ) # get ibek-support and related folders else: default_assets = [] # folder names with binary files in them binary = ["bin", "lib"] + # move the default assets and extras in their entirety + extra_files = default_assets + extras + for asset in extra_files: + src = source / asset + if src.exists(): + dest_file = destination / asset.relative_to("/") + if dry_run: + typer.echo(f"Would move extra asset {src} to {dest_file} with {binary}") + else: + move_file(src, dest_file, binary) + else: + typer.echo(f"WARNING: runtime asset {src} missing") + # identify EPICS modules as folders with binary output folders + # and move only their output folders as specified by asset_matches binaries: List[Path] = [] for find in binary: # only look two levels deep @@ -99,15 +116,3 @@ def extract_assets( typer.echo(f"Would move {src} to {dest_file} with {binary}") else: move_file(src, dest_file, binary) - - extra_files = default_assets + extras - for asset in extra_files: - src = source / asset - if src.exists(): - dest_file = destination / asset.relative_to("/") - if dry_run: - typer.echo(f"Would move extra asset {src} to {dest_file} with {binary}") - else: - move_file(src, dest_file, binary) - else: - typer.echo(f"WARNING: runtime asset {src} missing") diff --git a/src/ibek/support_cmds/commands.py b/src/ibek/support_cmds/commands.py index 930b0b7e1..0c5e4f056 100644 --- a/src/ibek/support_cmds/commands.py +++ b/src/ibek/support_cmds/commands.py @@ -262,7 +262,11 @@ def compile( path = SUPPORT / module command = f"make -C {path} -j $(nproc) " + " ".join(ctx.args) - exit(subprocess.call(["bash", "-c", command])) + result = subprocess.call(["bash", "-c", command]) + # save size of developer container with make clean + command = f"make -C {path} -j $(nproc) clean" + subprocess.call(["bash", "-c", command]) + exit(result) @support_cli.command()