Skip to content

feat: compare new versions with semver #457

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

Merged
merged 1 commit into from
Jun 24, 2025
Merged

Conversation

johnste
Copy link
Owner

@johnste johnste commented Jun 24, 2025

  • Use the semver packages to properly compare versions

@johnste johnste requested a review from Copilot June 24, 2025 20:45
Copilot

This comment was marked as outdated.

@johnste johnste force-pushed the feat/proper-update-check branch from 7ae56ab to d439d8e Compare June 24, 2025 20:51
@johnste johnste requested a review from Copilot June 24, 2025 20:54
Copilot

This comment was marked as outdated.

@johnste johnste force-pushed the feat/proper-update-check branch from d439d8e to db1b6fc Compare June 24, 2025 21:04
@johnste johnste requested a review from Copilot June 24, 2025 21:17
Copy link

@Copilot Copilot AI left a 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 PR implements proper semantic version comparisons using the semver package and updates the version check logic accordingly.

  • Introduces tests for various version comparison scenarios, including invalid and pre-release versions.
  • Updates the update check logic in version.go to use semver for more reliable version comparisons.
  • Adds the semver package dependency in go.mod.

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
apps/finicky/src/version/version_test.go Added test cases to validate update availability using semantic versioning.
apps/finicky/src/version/version.go Replaced string equality checks with semver-based comparisons and enhanced logging for update checks.
apps/finicky/src/go.mod Added dependency on the semver package.
Comments suppressed due to low confidence (1)

apps/finicky/src/version/version_test.go:20

  • Consider adding additional test cases covering semver build metadata (e.g., '1.0.0+build') to ensure that such versions are correctly compared.
		{"invalid latest version", "1.0.0", "invalid", false, true},

@johnste johnste marked this pull request as ready for review June 24, 2025 21:44
@johnste johnste merged commit f94e8cb into main Jun 24, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant