build(windows): 🏗️ adding winget distribution channel - #1579
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Critical and moderate issues remain in asset selection, Git failure handling, and Makefile paths.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds a Windows WinGet distribution channel with manifest generation, hashing, validation, and submission tooling.
Changes:
- Adds PowerShell scripts for WinGet workflows.
- Adds Make targets and release documentation.
- Updates installation links, changelog, and ignored generated manifests.
File summaries
| File | Description | Review findings |
|---|---|---|
README.md |
Adds the WinGet installation link. | None. |
Changelog |
Records WinGet distribution tooling. | Nit (1 vote): Preserve the existing v2.3.0 release summary when adding WinGet. |
build/winget/submit-pr.ps1 |
Submits manifests through a fork and pull request. | Critical (2 votes): Check native Git failures before continuing; stale FETCH_HEAD could cause incorrect resets or submissions. Moderate (1 vote): Recompute $IsNew after synchronizing with upstream. |
build/winget/sha256-from-url.ps1 |
Computes installer SHA256 hashes. | Critical (1 vote): Require exactly one matching installer or accept an explicit asset name. |
build/winget/README.md |
Documents setup and release procedures. | Nits: Correct the WinGet package identifier (2 votes), use the appropriate shell variable syntax (1 vote), and use GPL-2.0-or-later (2 votes). |
build/winget/generate-from-release.ps1 |
Generates WinGet manifests from GitHub release assets. | Critical (1 vote): Avoid selecting an ambiguous first matching asset. Moderate (2 votes): Emit GPL-2.0-or-later. |
build/Makefile |
Adds WinGet workflow targets. | Four moderate findings (1 vote each): Correct generator, validation, submission, and hashing paths relative to the build/ working directory. |
.gitignore |
Ignores generated WinGet manifests. | None. |
Review details
Suppressed comments (8)
Changelog:3
- This replaces the existing v2.3.0 release headline about source-code syntax highlighting with only
winget, even though the winget change already has a separate Build entry below.build/make/distro-pad-refresh.py:154-162uses theReleased...headline as the PAD release summary, so this also causes generated release metadata to omit the existing feature; preserve the original summary and append the winget distribution instead.
* Released v2.3.0 - winget.
build/Makefile:522
- This Makefile is executed from
build/(the existing targets use paths such as./makeand../app), so this resolves tobuild/build/winget/...and the generator cannot be found. Use the script path relative to this Makefile.
powershell.exe -NoProfile -ExecutionPolicy Bypass -File build/winget/generate-from-release.ps1 -Version $(VERSION)
build/Makefile:526
- From the
build/working directory, this points atbuild/distro/..., while the generator writes to the repository-rootdistro/...; validation therefore cannot find the generated manifests. The manifest path needs to go up one directory.
winget validate --manifest distro/winget/manifests/m/MindForger/MindForger/$(VERSION)
build/Makefile:530
- This target has the same working-directory problem as the generator target:
build/winget/submit-pr.ps1is resolved relative tobuild/and becomes nonexistent. Invoke the script relative to the Makefile directory.
powershell.exe -NoProfile -ExecutionPolicy Bypass -File build/winget/submit-pr.ps1 -Version $(VERSION) -WingetPkgsDir "$(WINGET_PKGS_DIR)"
build/Makefile:534
- This target also resolves its script as
build/build/winget/sha256-from-url.ps1when run in the normalbuild/working directory, so the hash helper cannot start. Use the path relative to this Makefile.
powershell.exe -NoProfile -ExecutionPolicy Bypass -File build/winget/sha256-from-url.ps1 -Version $(VERSION)
build/winget/README.md:59
- The setup command above uses PowerShell, but this verification line uses cmd expansion syntax; in the documented PowerShell flow it prints the literal
%WINGET_PKGS_DIR%instead of the value. Use PowerShell expansion here or label the block as Command Prompt.
echo %WINGET_PKGS_DIR%
build/winget/submit-pr.ps1:81
- This unconditional hard reset discards any uncommitted changes in the local winget-pkgs checkout before creating the branch. Add a dirty-worktree check (or require explicit confirmation) before resetting so rerunning this helper cannot silently destroy unrelated manifest work.
git reset --hard FETCH_HEAD
build/winget/submit-pr.ps1:56
$IsNewis computed before the script synchronizes the fork with upstream. If the local clone is stale and the package was already merged upstream, this run will incorrectly create anNew packagePR title instead of an update. Recompute this value after the fetch/checkout/reset block.
$IsNew = -not (Test-Path (Join-Path $WingetPkgsDir "manifests\m\MindForger"))
- Files reviewed: 7/8 changed files
- Comments generated: 6
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds winget distribution channel.
Related: