Resolved a build issue in the scripts on linux systems (maybe)
This commit is contained in:
parent
ef67ab3629
commit
dcd5a7feb7
@ -108,7 +108,11 @@ def main() -> int:
|
|||||||
return code
|
return code
|
||||||
|
|
||||||
target_dir = app_root / "src-tauri" / "target" / ("debug" if args.configuration == "Debug" else "release")
|
target_dir = app_root / "src-tauri" / "target" / ("debug" if args.configuration == "Debug" else "release")
|
||||||
exes = sorted(target_dir.glob("*.exe"), key=lambda p: p.stat().st_mtime, reverse=True)
|
if args.runtime.startswith("win-") or getattr(sys, "platform", "").startswith("win"):
|
||||||
|
exes = sorted(target_dir.glob("*.exe"), key=lambda p: p.stat().st_mtime, reverse=True)
|
||||||
|
else:
|
||||||
|
exes = sorted((p for p in target_dir.glob("*") if p.is_file() and not p.suffix), key=lambda p: p.stat().st_mtime, reverse=True)
|
||||||
|
|
||||||
if exes:
|
if exes:
|
||||||
staged = output_root / exes[0].name
|
staged = output_root / exes[0].name
|
||||||
if args.dry_run:
|
if args.dry_run:
|
||||||
|
|||||||
@ -46,8 +46,12 @@ def main() -> int:
|
|||||||
sidecar_proj = next((p.parent for p in repo_root.rglob("*.csproj") if "sidecar" in str(p).lower()), None)
|
sidecar_proj = next((p.parent for p in repo_root.rglob("*.csproj") if "sidecar" in str(p).lower()), None)
|
||||||
sidecar_bin = sidecar_proj / "bin" if sidecar_proj else None
|
sidecar_bin = sidecar_proj / "bin" if sidecar_proj else None
|
||||||
if sidecar_bin is not None:
|
if sidecar_bin is not None:
|
||||||
sidecar_pattern = "*.exe" if os.name == "nt" else "*"
|
if os.name == "nt":
|
||||||
sidecar_exe = newest_file(sidecar_bin, sidecar_pattern)
|
sidecar_exe = newest_file(sidecar_bin, "*.exe")
|
||||||
|
else:
|
||||||
|
candidates = [p for p in sidecar_bin.rglob("*") if p.is_file() and not p.suffix and os.access(p, os.X_OK)]
|
||||||
|
sidecar_exe = max(candidates, key=lambda p: p.stat().st_mtime) if candidates else None
|
||||||
|
|
||||||
if sidecar_exe is not None:
|
if sidecar_exe is not None:
|
||||||
copy_tree_contents(sidecar_exe.parent, output_dir)
|
copy_tree_contents(sidecar_exe.parent, output_dir)
|
||||||
print(f"Synced sidecar -> {output_dir}")
|
print(f"Synced sidecar -> {output_dir}")
|
||||||
@ -57,8 +61,12 @@ def main() -> int:
|
|||||||
gateway_proj = next((p.parent for p in repo_root.rglob("*.csproj") if "gateway" in str(p).lower()), None)
|
gateway_proj = next((p.parent for p in repo_root.rglob("*.csproj") if "gateway" in str(p).lower()), None)
|
||||||
gateway_bin = gateway_proj / "bin" if gateway_proj else None
|
gateway_bin = gateway_proj / "bin" if gateway_proj else None
|
||||||
if gateway_bin is not None:
|
if gateway_bin is not None:
|
||||||
gateway_pattern = "*.exe" if os.name == "nt" else "*"
|
if os.name == "nt":
|
||||||
gw_exe = newest_file(gateway_bin, gateway_pattern)
|
gw_exe = newest_file(gateway_bin, "*.exe")
|
||||||
|
else:
|
||||||
|
candidates = [p for p in gateway_bin.rglob("*") if p.is_file() and not p.suffix and os.access(p, os.X_OK)]
|
||||||
|
gw_exe = max(candidates, key=lambda p: p.stat().st_mtime) if candidates else None
|
||||||
|
|
||||||
if gw_exe is not None:
|
if gw_exe is not None:
|
||||||
gw_out = output_dir / "webgateway"
|
gw_out = output_dir / "webgateway"
|
||||||
copy_tree_contents(gw_exe.parent, gw_out)
|
copy_tree_contents(gw_exe.parent, gw_out)
|
||||||
@ -69,7 +77,12 @@ def main() -> int:
|
|||||||
tauri_target = next((p for p in repo_root.rglob("src-tauri") if (p / "target").exists()), None)
|
tauri_target = next((p for p in repo_root.rglob("src-tauri") if (p / "target").exists()), None)
|
||||||
tauri_target = tauri_target / "target" if tauri_target else None
|
tauri_target = tauri_target / "target" if tauri_target else None
|
||||||
if tauri_target is not None:
|
if tauri_target is not None:
|
||||||
app_exe = newest_file(tauri_target, "*.exe")
|
if os.name == "nt":
|
||||||
|
app_exe = newest_file(tauri_target, "*.exe")
|
||||||
|
else:
|
||||||
|
candidates = [p for p in tauri_target.rglob("*") if p.is_file() and not p.suffix and os.access(p, os.X_OK)]
|
||||||
|
app_exe = max(candidates, key=lambda p: p.stat().st_mtime) if candidates else None
|
||||||
|
|
||||||
if app_exe is not None:
|
if app_exe is not None:
|
||||||
shutil.copy2(app_exe, output_dir / app_exe.name)
|
shutil.copy2(app_exe, output_dir / app_exe.name)
|
||||||
print(f"Synced desktop app ({app_exe.name}) -> {output_dir}")
|
print(f"Synced desktop app ({app_exe.name}) -> {output_dir}")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user