Repository navigation
fix(winget): submit manifests with the moniker "upsun" - #257
Merged
Merged
Conversation
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>
Contributor
There was a problem hiding this comment.
Note
Reviewed — No blocking findings · 🔵 1 minor point
🔍 Full review · 2 files reviewed
🔵 Minor point
scripts/winget-submit.sh:52— Thesed -i 's/^Moniker: .*/Moniker: upsun/'rewrite succeeds even when it matches nothing. If a GoReleaser release stops emitting aMoniker: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 theupsunmoniker, and nothing reports it. If the locale file is missing,set -einstead 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: upsunresult. - The
$dir/$id.locale.en-US.yamlpath follows fromid, which is the installer basename (Upsun.CLI), and matches GoReleaser's locale manifest naming for package_identifierUpsun.CLI. - GNU
sed -iwith no suffix argument is fine here because thewingetjob 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>
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.
GoReleaser sets the winget locale manifest's
Monikerto the entry'sname(Upsun CLI), with no option to set it separately, and changingnamewould also changePackageName.scripts/winget-submit.shnow rewrites it toupsunbefore uploading the manifests, so automated submissions keep the moniker of the firstUpsun.CLIpackage.🤖 Generated with Claude Code