-
Notifications
You must be signed in to change notification settings - Fork 101
Add --display-name override argument #644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add --display-name override argument #644
Conversation
Add new `--display-name` override that allows the DisplayName to be manually specified when it includes a version string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds a new --display-name command-line argument to the update command, allowing users to manually specify the DisplayName field when it includes version strings that need to be updated. This complements the existing --display-version functionality and addresses scenarios where package manifests contain version-specific display names.
Key Changes
- Added new
--display-nameCLI option to override DisplayName values during manifest updates - Implemented logic to update DisplayName in AppsAndFeaturesEntries, following the same pattern as DisplayVersion
- Added comprehensive test coverage with new test case and test manifest resource
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/WingetCreateCore/Models/InstallerMetadata.cs | Adds DisplayName property to store CLI argument value |
| src/WingetCreateCore/Common/PackageParser.cs | Implements logic to update DisplayName in installers' AppsAndFeaturesEntries |
| src/WingetCreateCLI/Commands/UpdateCommand.cs | Defines --display-name CLI option and propagates value to installer metadata |
| src/WingetCreateCLI/Properties/Resources.resx | Adds help text resource for the new option |
| src/WingetCreateCLI/Properties/Resources.Designer.cs | Generated code for new resource string |
| doc/update.md | Documents the new --display-name argument |
| src/WingetCreateTests/WingetCreateTests/UnitTests/UpdateCommandTests.cs | Adds UpdateDisplayName test to verify the functionality |
| src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.UpdateDisplayName.yaml | Test manifest with DisplayName field for testing |
| src/WingetCreateTests/WingetCreateTests/WingetCreateTests.csproj | Registers new test resource file for build output |
Files not reviewed (1)
- src/WingetCreateCLI/Properties/Resources.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/WingetCreateTests/WingetCreateTests/WingetCreateTests.csproj
Outdated
Show resolved
Hide resolved
src/WingetCreateTests/WingetCreateTests/Resources/TestPublisher.UpdateDisplayName.yaml
Show resolved
Hide resolved
src/WingetCreateTests/WingetCreateTests/UnitTests/UpdateCommandTests.cs
Outdated
Show resolved
Hide resolved
Address Copilot code review comments.
Add new
--display-nameoverride that allows the DisplayName to be manually specified when it includes a version string.For example this manifest contains the version number but the update command does not currently update the value.
With these changes it's possible to override like thus:
Microsoft Reviewers: Open in CodeFlow