Skip to content

fix: sanitize version when checking the latest Updatecli version available#8824

Merged
olblak merged 3 commits into
updatecli:mainfrom
olblak:fix/check/version
May 16, 2026
Merged

fix: sanitize version when checking the latest Updatecli version available#8824
olblak merged 3 commits into
updatecli:mainfrom
olblak:fix/check/version

Conversation

@olblak

@olblak olblak commented May 16, 2026

Copy link
Copy Markdown
Member

Fix minor issue when checking the latest version as the one retrieved from updatecli.io contains a v prefix while the embedded in the binary doesn't

The goal is to avoid the following issue

A new version of updatecli is available: v0.117.0 (current: "0.117.0")
Changelog available at: www.updatecli.io/changelogs/updatecli/changelogs/v0.117.0/

Test

/

Additional Information

Checklist

  • I have updated the documentation via pull request in website repository.

Tradeoff

Potential improvement

Signed-off-by: Olblak <me@olblak.com>
@olblak olblak added the bug Something isn't working label May 16, 2026
@olblak olblak requested a review from Copilot May 16, 2026 11:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 aims to normalize Updatecli version strings when checking whether the running binary is already at the latest published version.

Changes:

  • Adds version sanitization to trim whitespace and remove a leading v.
  • Updates the “new version available” log message to use sanitized version strings.
  • Simplifies the versionHTTPEndpoint variable declaration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/core/engine/version.go Outdated
Comment thread pkg/core/engine/version.go Outdated
Signed-off-by: Olblak <me@olblak.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@olblak olblak enabled auto-merge (squash) May 16, 2026 12:21
@olblak olblak merged commit 647cca5 into updatecli:main May 16, 2026
7 checks passed
@olblak olblak changed the title fix: sanitize version when checking latest one fix: sanitize version when checking the latest Updatecli version available May 26, 2026
@olblak olblak added the core All things related to Updatecli core engine label May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core All things related to Updatecli core engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants