-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathbuild.py
More file actions
executable file
·34 lines (28 loc) · 1.06 KB
/
build.py
File metadata and controls
executable file
·34 lines (28 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
eCan Unified Build System v9.0
Supports multiple build modes and performance optimization
"""
import sys
from build_system.build_cleaner import BuildCleaner
def main():
"""Thin wrapper that delegates to build_system.unified_build.main"""
from build_system.unified_build import main as ub_main
return ub_main()
if __name__ == "__main__":
# Thin wrapper:
# - Handle --cleanup-only locally for convenience/compatibility
# - Delegate all other CLI handling to the unified build system
import sys as _sys
if "--cleanup-only" in _sys.argv:
try:
cleaner = BuildCleaner(verbose=False)
results = cleaner.clean_all()
print(f"[CLEAN] Done. Freed {results['total_size_mb']:.1f}MB, removed {results['broken_symlinks']} broken symlinks")
_sys.exit(0)
except Exception as _e:
print(f"[CLEAN] Warning: cleanup failed: {_e}")
_sys.exit(1)
from build_system.unified_build import main as ub_main
_sys.exit(ub_main())