diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-06-17 21:33:40 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-06-17 21:57:13 +0800 |
| commit | ad0943f88ba9f5ed6eae198ecb4835c0f44701de (patch) | |
| tree | 6a8eb1fee42e7ee173e74788dafeb27c52429683 /rola-devtools/scripts/check-all.py | |
chore: initialize project structure and add core modules
Diffstat (limited to 'rola-devtools/scripts/check-all.py')
| -rw-r--r-- | rola-devtools/scripts/check-all.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/rola-devtools/scripts/check-all.py b/rola-devtools/scripts/check-all.py new file mode 100644 index 0000000..cd2ddf1 --- /dev/null +++ b/rola-devtools/scripts/check-all.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python3 + +import subprocess +import sys +from pathlib import Path + +script_dir = Path(__file__).resolve().parent +root_dir = script_dir.parent.parent + +steps = [ + ("cargo check --workspace", [ + "cargo", "check", "--workspace", + ]), + ("cargo clippy --workspace -- -D warnings", [ + "cargo", "clippy", "--workspace", "--", "-D", "warnings", + ]), + ("cargo build --workspace --release", [ + "cargo", "build", "--workspace", "--release", + ]), + ("dotnet restore", [ + "dotnet", "restore", "rola-desktop.sln", + ]), + ("dotnet build", [ + "dotnet", "build", "rola-desktop.sln", "--nologo", + ]), +] + +ok = True +for label, cmd in steps: + print(f"\nSTEP - \"{label}\": ", flush=True) + result = subprocess.run(cmd, cwd=root_dir) + if result.returncode != 0: + print(f" [FAILED] Failed (exit code {result.returncode})", flush=True) + ok = False + break + print(f" [SUCCESS] Passed", flush=True) + +sys.exit(0 if ok else 1) |
