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

feat: use semver for version check #3295

Merged
merged 2 commits into from Oct 25, 2023
Merged

feat: use semver for version check #3295

merged 2 commits into from Oct 25, 2023

Conversation

schoren
Copy link
Collaborator

@schoren schoren commented Oct 25, 2023

This PR changes how the CLI checks for version. Instead of an exact mach, it does a semver comparision for [major].[minor], alowing any patch and prereleases to be considered valid.

version := meta.GetVersion()
isVersionMatch := version == Version
if isVersionMatch {
if !isSemver(version) || !isSemver(Version) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is the old behaviour. useful for CI and development, where versions are not semantic (like dev or some commit sha)

@schoren schoren merged commit 271be34 into main Oct 25, 2023
37 checks passed
@schoren schoren deleted the semver-check branch October 25, 2023 21:04
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.

None yet

2 participants