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

version: don't remake semVer if not nil #233

Merged
merged 1 commit into from
Apr 24, 2024
Merged

Commits on Apr 16, 2024

  1. version: don't remake semVer if not nil

    The SemVer function of a PluginVersion returns the version.Version
    instance bound to the PluginVersion.
    
    In former implementations of the structure, this could be nil in some
    cases, as only the version components were being registered, and the
    code would make sure that they were a valid semver version.
    
    Recent changes reorganised this code by making the semVer attribute
    always present, so while theoretically it could be nil, this would
    indicate a manipulation error.
    
    Therefore, we don't need to perform this check to re-create the semVer
    attribute, and by that change we fix the underlying issue that made
    semVer drop its pre-release/metadata parts when doing so.
    lbajolet-hashicorp committed Apr 16, 2024
    Configuration menu
    Copy the full SHA
    c4be673 View commit details
    Browse the repository at this point in the history