Skip to content

fix(winget): submit manifests with the moniker "upsun" - #257

Merged
pjcdawkins merged 2 commits into
mainfrom
fix/winget-moniker
Oct 21, 2026
Merged

pjcdawkins merged 2 commits into
mainfrom
fix/winget-moniker

Conversation

@pjcdawkins

Copy link
Copy Markdown
Contributor

GoReleaser sets the winget locale manifest's Moniker to the entry's name (Upsun CLI), with no option to set it separately, and changing name would also change PackageName. scripts/winget-submit.sh now rewrites it to upsun before uploading the manifests, so automated submissions keep the moniker of the first Upsun.CLI package.

🤖 Generated with Claude Code

GoReleaser sets the locale manifest's Moniker to the winget entry's name
("Upsun CLI"), and has no separate option for it. Changing the name would
also change PackageName. So winget-submit.sh rewrites the Moniker line
before uploading the manifests, matching the first Upsun.CLI submission.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@upsun-dispatch upsun-dispatch Bot 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.

Note

Reviewed — No blocking findings · 🔵 1 minor point

🔍 Full review · 2 files reviewed

🔵 Minor point

  • scripts/winget-submit.sh:52 — The sed -i 's/^Moniker: .*/Moniker: upsun/' rewrite succeeds even when it matches nothing. If a GoReleaser release stops emitting a Moniker: line, indents it, or names the locale file something other than $id.locale.en-US.yaml, the script uploads the manifests and opens the winget-pkgs PR without the upsun moniker, and nothing reports it. If the locale file is missing, set -e instead aborts the script after the fork branch has been created. Checking the result afterwards (e.g. grep -qx 'Moniker: upsun' "$dir/$id.locale.en-US.yaml" || exit 1) would make the fix fail loudly.
Verification
  • The sed runs before the upload loop, so the rewritten locale file is the one sent to the fork through the contents API.
  • The rewrite is idempotent, so re-running the script after a partial failure gives the same Moniker: upsun result.
  • The $dir/$id.locale.en-US.yaml path follows from id, which is the installer basename (Upsun.CLI), and matches GoReleaser's locale manifest naming for package_identifier Upsun.CLI.
  • GNU sed -i with no suffix argument is fine here because the winget job runs on ubuntu-latest.

No test covers this script. The change only runs in the release workflow's winget job (.github/workflows/release.yml) on non-prerelease tags, so it is first exercised at the next release.

Review details
  • Commit: b53102d
  • Model: claude-opus-5-5

Review 1 of 10 for this pull request · View the full run

Check the rewritten locale manifest, and do it before creating the fork
branch, so a change in GoReleaser output stops the submission instead of
sending the default moniker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pjcdawkins
pjcdawkins merged commit b1b64a1 into main Oct 21, 2026
7 checks passed
@pjcdawkins
pjcdawkins deleted the fix/winget-moniker branch October 21, 2026 15:44
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.

1 participant