mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-09 12:06:04 +01:00
ci: move validate maintainers logic to lib
Allow easily running the individual checks outside of GHA for easier testing/modification. Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
bc9f3c8413
commit
defabc11ab
4 changed files with 131 additions and 88 deletions
25
lib/python/validate-maintainers-syntax.py
Executable file
25
lib/python/validate-maintainers-syntax.py
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env python3
|
||||
"""
|
||||
Validate maintainers.nix syntax
|
||||
|
||||
This script validates that the maintainers.nix file has valid Nix syntax.
|
||||
"""
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
print("🔍 Validating maintainers.nix syntax...")
|
||||
|
||||
try:
|
||||
subprocess.run(['nix', 'eval', '--file', 'modules/lib/maintainers.nix', '--json'],
|
||||
capture_output=True, text=True, check=True)
|
||||
print("✅ Valid Nix syntax")
|
||||
except subprocess.CalledProcessError:
|
||||
print("❌ Invalid Nix syntax")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue