$ show Romanitho/Winget-AutoUpdate
Winget-AutoUpdate (WAU) is a PowerShell-based Windows service that automates daily application updates using the winget package manager. It runs as a scheduled task in both system and user contexts, supporting blacklist/whitelist filtering, GPO/Intune management via ADMX templates, and extensible 'Mods' for pre/post-install hooks. The architecture is modular: a main orchestrator (Winget-Upgrade.ps1) loads single-responsibility functions from a `functions/` directory, handles network checks, prerequisite installation, and update logic. Notifications use Windows Toast API with locale support. The MSI installer (built with WiX) creates scheduled tasks and registry configuration. External dependencies include winget CLI, Microsoft Visual C++ Redistributable, and optional AzCopy for Azure Blob mods sync. The codebase demonstrates solid PowerShell engineering with structured logging, semantic versioning, and comprehensive CI/CD pipelines.
The LLM identified 4 files worth highlighting for reuse:
Parses a string of winget arguments into an array, correctly handling single/double quotes and spaces. Uses a regex pattern to capture quoted and unquoted tokens, with a fallback to simple split on failure. Reusable in any PowerShell project needing robust command-line argument splitting.
Compares two semantic version strings, including pre-release tags (e.g., '1.0.0-beta1'). Handles major/minor/build/revision and correctly treats pre-release as less than release. Self-contained and easily extractable for any version comparison need.
Writes timestamped log entries to a file with console color output. Automatically creates the log file with an ACL granting Modify to Authenticated Users. Supports header formatting and is used throughout the project. A clean, reusable logging utility for PowerShell scripts.
Synchronizes mod scripts from external sources (HTTP, Azure Blob Storage, UNC/local paths) to a local directory. Compares timestamps, downloads newer files, and deletes local files not present externally. Handles SAS tokens, directory listings, and AzCopy integration. A robust pattern for remote file synchronization in PowerShell.