chocolatey / ChocolateyGUI

A delicious GUI for Chocolatey
https://docs.chocolatey.org/en-us/chocolatey-gui/
Apache License 2.0
1.61k stars 248 forks source link

(#1005) Normalize version numbers #1006

Closed AdmiringWorm closed 1 year ago

AdmiringWorm commented 1 year ago

Description Of Changes

This pull request normalizes the dispaying and usages of normalized version numbers. To aid and try prevent non-normalized version numbers used, a banned API analyzer has also been added.

Motivation and Context

We should use the equivalent of version normalization that was introduced in Chocolatey CLI v2.0.0.

Testing

  1. Open Chocolatey GUI
  2. Navigate to the Chocolatey Source
  3. Search for 7zip.portable
  4. Verify 7zip.portable is shown with normalized version (ie 3 part version without leading zeros).
  5. Open detail page.
  6. Verify again only normalized version numbers are shown.
  7. Click button for advanced installation.
  8. Verify drop down list shows normalized version number of latest version.
  9. Install the package.
  10. Navigate to This PC.
  11. Verify installed 7zip.portable package is shown with normalized version number.
  12. Open details page and verify again normalized version number is shown.
  13. View Package Arguments (NOTE: Manual work may be needed if running in debug mode).
  14. Verify the package arguments are shown

Operating Systems Testing

Change Types Made

Change Checklist

Related Issue

Fixes #1005

gep13 commented 1 year ago

@AdmiringWorm thanks for fixing this up!