This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
validate_xml.py | |
- Auto-installs required Python packages (pyyaml, packaging) if missing. | |
- Auto-clones a shallow copy of microsoft/winget-pkgs into the same folder as this script | |
(folder name: 'winget-pkgs') unless --no-clone is specified or --repo-path is provided. | |
- If a repo exists, optionally updates it (git pull / fetch+reset fallback) unless --no-update. | |
- Builds an index of Winget package IDs -> versions by scanning manifests/*.yaml. | |
- Parses the provided XML, finds all <win .../> elements, compares declared Version to latest found, |