-
Notifications
You must be signed in to change notification settings - Fork 909
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
(#3477) Replace Get-ChecksumValid with Assert-ValidChecksum cmdlet. #3525
Conversation
There is one final matter to resolve before this PR is fully ready; help documentation for the cmdlet. I will have a corresponding PR opened on the docs repository by tomorrow, and then update the |
406ebb8
to
ce9d045
Compare
1627d8f
to
7574df1
Compare
After talking with @gep13 we have agreed it is best not to update the XML here at present, as it would require increasingly complicated messing around with the associated docs PRs as we rewrite more commands, and will instead opt to update the help XML file before a release artifact is created. |
a1983e4
to
f9be806
Compare
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.
Can you get this PR rebased onto the head of develop?
f9be806
to
61cfde0
Compare
As a small convenience, to allow us to run tests for an invididual cmdlet when doing development testing.
This command replaces the Get-ChecksumValid helper function, adding an alias for compatibility purposes.
Add tests to ensure the behaviour of rewritten command matches the original behaviour.
When working on this, some irregularities were noted with the generation of the documentation, so these changes avoid the issues that arose.
This allows us to maintain a simple list of deprecated aliases and the new command name, or commands that are being removed, and automatically warn when that command is called.
61cfde0
to
69c0cac
Compare
@gep13 are we good to merge this? just gave it a rebase so I think everything's more or less sorted? |
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.
LGTM!
Yes, I think we can move forward with this! Thanks for getting this done! |
Description Of Changes
Get-ChecksumValid
Assert-ValidChecksum
This PR does not contain the compiled XML help information for the command. In discussion with @gep13 we agreed that it would be better to compile that in the final release. I will have a docs PR linked here in a moment, watch this space.
Note: As this PR is part of #3477 and is thus a breaking change to a degree, we will need to cut a
support/2.x
branch once this is merged, so that none of the breaking changes associated with #3477 inadvertently make their way into the 2.x versions.Motivation and Context
See #3477
Documentation PR: chocolatey/docs#1075
Testing
Tested locally with the accompanying Pester tests:
.\build.ps1
.\Invoke-Tests.ps1 -Tag AssertValidChecksum
Proving out the deprecated commands framework
After running the above, close and reopen the admin PowerShell session, and then follow these steps:
Get-ChecksumValid
and that the alias is deprecated and should be replaced withAssert-ValidChecksum
Operating Systems Testing
Windows 10
Change Types Made
Change Checklist
Related Issue
Part of #3477