forked from semios/semios-packages
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18f624e3c9 |
+6
-3
@@ -22,6 +22,10 @@ def build(rem: list[str] = []):
|
|||||||
subprocess.run(cmdline)
|
subprocess.run(cmdline)
|
||||||
|
|
||||||
|
|
||||||
|
def artifacts_dir():
|
||||||
|
return f"target/{_rust_triple(arch.get_target())}/release"
|
||||||
|
|
||||||
|
|
||||||
def _do_auto_pack(pc: pkgcomposer.PkgComposer, srcdir: str, dstdir: str, filter):
|
def _do_auto_pack(pc: pkgcomposer.PkgComposer, srcdir: str, dstdir: str, filter):
|
||||||
pc.makedir(dstdir)
|
pc.makedir(dstdir)
|
||||||
with os.scandir(srcdir) as entries:
|
with os.scandir(srcdir) as entries:
|
||||||
@@ -49,11 +53,10 @@ def _autopack_filter_bin(ent) -> bool:
|
|||||||
|
|
||||||
|
|
||||||
def _auto_pack(profiles: list[str], pc: pkgcomposer.PkgComposer):
|
def _auto_pack(profiles: list[str], pc: pkgcomposer.PkgComposer):
|
||||||
target_dir = f"target/{_rust_triple(arch.get_target())}/release"
|
|
||||||
if "lib" in profiles:
|
if "lib" in profiles:
|
||||||
_do_auto_pack(pc, target_dir, "lib", _autopack_filter_lib)
|
_do_auto_pack(pc, artifacts_dir(), "lib", _autopack_filter_lib)
|
||||||
if "bin" in profiles:
|
if "bin" in profiles:
|
||||||
_do_auto_pack(pc, target_dir, "bin", _autopack_filter_bin)
|
_do_auto_pack(pc, artifacts_dir(), "bin", _autopack_filter_bin)
|
||||||
|
|
||||||
|
|
||||||
def use_auto_pack(profiles: list[str]):
|
def use_auto_pack(profiles: list[str]):
|
||||||
|
|||||||
Reference in New Issue
Block a user