Skip to content
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

Fix the version comparation error for pre-releases in CodeGen tool #1088

Merged
merged 1 commit into from
May 1, 2024

Conversation

helto4real
Copy link
Collaborator

Breaking change

Proposed change

Fixes the version check error when using pre-releases in code generator tool.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the [development checklist][dev-checklist]
  • The code compiles without warnings (code quality chek)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

Copy link

codecov bot commented Apr 30, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 77%. Comparing base (f3c00df) to head (b508f46).

Files Patch % Lines
...mon.HassModel.CodeGenerator/DependencyValidator.cs 66% 1 Missing ⚠️
Additional details and impacted files
@@         Coverage Diff          @@
##           main   #1088   +/-   ##
====================================
- Coverage    77%     77%   -1%     
====================================
  Files       186     186           
  Lines      5165    5168    +3     
  Branches    660     660           
====================================
  Hits       3990    3990           
- Misses     1027    1030    +3     
  Partials    148     148           
Flag Coverage Δ
unittests 77% <66%> (-1%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

public class DependencyValidatorTests
{
// Test that pre-release versions are trimmed using the TrimPreReleaseVersion method using theory
[Theory]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would test this in context of the comparison. So a package version with suffix should match a Libray version without a version.

@helto4real helto4real merged commit fbe60a1 into main May 1, 2024
6 of 8 checks passed
@helto4real helto4real deleted the fix-alpha-release-compare-version branch May 1, 2024 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants