feat(detmir): add rust-first operations tooling

This commit is contained in:
igor04091968
2026-06-02 17:57:58 +03:00
parent 60670d30a8
commit 19e3682bc8
263 changed files with 51678 additions and 718 deletions
+25 -1
View File
@@ -5,10 +5,29 @@ ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT_DIR"
KIT_DIR="install-kit-awindows-20260427-211240"
TARGET_ROOT="${CARGO_TARGET_DIR:-$ROOT_DIR/adk-rust/target}"
RUST_BIN="${CHECK_INSTALL_KIT_VS_REPO_RUST:-}"
rust_candidates=()
if [[ -n "$RUST_BIN" ]]; then
rust_candidates+=("$RUST_BIN")
fi
rust_candidates+=(
"$TARGET_ROOT/release/check-install-kit-vs-repo"
"$ROOT_DIR/adk-rust/target/release/check-install-kit-vs-repo"
"/usr/local/bin/check-install-kit-vs-repo"
)
for candidate in "${rust_candidates[@]}"; do
if [[ -x "$candidate" ]]; then
exec "$candidate" --root "$ROOT_DIR" --kit-dir "$KIT_DIR" "$@"
fi
done
python3 - <<'PY'
from pathlib import Path
import hashlib
import sys
root=Path('.')
kit=Path('install-kit-awindows-20260427-211240')
@@ -37,7 +56,10 @@ for kp in sorted(p for p in kit.rglob('*') if p.is_file() and p.name!='MANIFEST.
if sha(kp)!=sha(rp):
mismatches.append(str(rel))
ps_mismatches=[p for p in mismatches if p.startswith('windows/') and p.endswith('.ps1') or p.endswith('.psm1') or p.endswith('.psd1')]
ps_mismatches=[
p for p in mismatches
if p.startswith('windows/') and p.endswith(('.ps1', '.psm1', '.psd1'))
]
print(f'Compared files: {len(all_compared)}')
print(f'Missing in repo: {len(missing_in_repo)}')
@@ -55,4 +77,6 @@ if ps_mismatches:
print('--- PowerShell mismatches ---')
for p in ps_mismatches:
print(p)
if missing_in_repo or mismatches:
sys.exit(1)
PY