File size: 712 Bytes
8c3e275
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/usr/bin/env python3
# SPDX-FileCopyrightText: 2026 Team Centurions
# SPDX-License-Identifier: AGPL-3.0-or-later

import subprocess
from pathlib import Path

ROOT_DIR = Path(__file__).resolve().parent.parent

def main() -> None:
    print("Generating .secrets.baseline file...")
    cmd = [
        str(ROOT_DIR / ".venv" / "Scripts" / "detect-secrets"),
        "scan",
        "--exclude-files",
        r".*\.specify.*"
    ]
    
    res = subprocess.run(cmd, capture_output=True, text=True, check=True)
    baseline_path = ROOT_DIR / ".secrets.baseline"
    baseline_path.write_text(res.stdout, encoding="utf-8")
    print(f"Successfully generated {baseline_path}")

if __name__ == "__main__":
    main()