Skip to content

build(windows): 🏗️ adding winget distribution channel - #1579

Merged
dvorka merged 8 commits into
dev/2.3.0from
feat-1568/winget
Sep 21, 2026
Merged

dvorka merged 8 commits into
dev/2.3.0from
feat-1568/winget

Conversation

@dvorka

@dvorka dvorka commented Sep 15, 2026

Copy link
Copy Markdown
Owner

This PR adds winget distribution channel.

Related:

@dvorka dvorka self-assigned this Sep 15, 2026
Copilot AI lite review requested due to automatic review settings September 15, 2026 07:47
@dvorka dvorka linked an issue Sep 15, 2026 that may be closed by this pull request

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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-162 uses the Released... 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 ./make and ../app), so this resolves to build/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 at build/distro/..., while the generator writes to the repository-root distro/...; 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.ps1 is resolved relative to build/ 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.ps1 when run in the normal build/ 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

  • $IsNew is 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 an New package PR 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.

Comment thread build/winget/generate-from-release.ps1 Outdated
Comment thread build/winget/sha256-from-url.ps1 Outdated
Comment thread build/winget/submit-pr.ps1 Outdated
Comment thread build/winget/generate-from-release.ps1 Outdated
Comment thread build/winget/README.md Outdated
Comment thread build/winget/README.md Outdated
@dvorka
dvorka merged commit f8af93e into dev/2.3.0 Sep 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] winget

2 participants