Skip to content

Optionally be able to work with leading 'v' #137

@ialidzhikov

Description

@ialidzhikov

Currently

semver.parse_version_info("v0.1.0")

fails with

ValueError: v0.1.0 is not valid SemVer string

However the leading v is not included in the semver spec (https://semver.org), but the master branch of semver/semver has the following faq section - https://github.com/semver/semver/blob/master/semver.md#is-v123-a-semantic-version :

Is "v1.2.3" a semantic version?
No, "v1.2.3" is not a semantic version. However, prefixing a semantic version with a "v" is a common way (in English) to indicate it is a version number. Abbreviating "version" as "v" is often seen with version control. Example: git tag v1.2.3 -m "Release version 1.2.3", in which case "v1.2.3" is a tag name and the semantic version is "1.2.3".

The golang and go modules requires the leading v and almost every project relies with the convention (for example kubernetes/kubernetes, docker/docker and etc.).

Masterminds/semver (the golang equivalent of this project) can optionally work with a v prefix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Not SemverThis issue does not belong to semver or is an invalid issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy