Spaces:
Sleeping
Sleeping
Push Bot
commited on
Commit
ยท
6793c76
1
Parent(s):
7dcb6c1
Fix SyntaxError; simplify debug; stage repo zip; make packages.txt empty
Browse files
app.py
CHANGED
|
@@ -978,7 +978,18 @@ def debug_compile_last_pipeline_zip():
|
|
| 978 |
logs = [f"๐ Debug(last-pipeline-zip) at {_now_str()}"]
|
| 979 |
last_zip = _find_last_pipeline_zip()
|
| 980 |
if not last_zip:
|
| 981 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 982 |
|
| 983 |
# Prepare workspace
|
| 984 |
run_id, WORK_DIR, LOG_PATH, _ = _prepare_workspace(logs)
|
|
|
|
| 978 |
logs = [f"๐ Debug(last-pipeline-zip) at {_now_str()}"]
|
| 979 |
last_zip = _find_last_pipeline_zip()
|
| 980 |
if not last_zip:
|
| 981 |
+
repo_zip = ROOT / "output.zip"
|
| 982 |
+
if repo_zip.exists():
|
| 983 |
+
try:
|
| 984 |
+
_, W, L, Z = _prepare_workspace(logs)
|
| 985 |
+
shutil.copy2(repo_zip, Z)
|
| 986 |
+
logs.append(f"๐ฆ Auto-staged repo output.zip โ runs/{W.name}/output.zip")
|
| 987 |
+
last_zip = Z
|
| 988 |
+
except Exception as e:
|
| 989 |
+
logs.append(f"โ Auto-stage failed: {e}")
|
| 990 |
+
return "<div style='color:#b00'>No recent pipeline output.zip found and auto-stage failed.</div>"
|
| 991 |
+
else:
|
| 992 |
+
return "<div style='color:#b00'>No recent pipeline output.zip found under runs/.</div>"
|
| 993 |
|
| 994 |
# Prepare workspace
|
| 995 |
run_id, WORK_DIR, LOG_PATH, _ = _prepare_workspace(logs)
|