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

Must the version tags include a v? #1

Closed
dustin opened this issue Dec 15, 2009 · 6 comments
Closed

Must the version tags include a v? #1

dustin opened this issue Dec 15, 2009 · 6 comments

Comments

@dustin
Copy link

dustin commented Dec 15, 2009

When tagging releases in a version control system, the tag for a version MUST be "vX.Y.Z" e.g. "v3.1.0".

I've always tagged my versions as X.Y.Z, e.g. 3.1.0. I pull that directly out with git describe for my apps to report their own versions.

@mojombo
Copy link
Contributor

mojombo commented Dec 17, 2009

I like having the v prepended so that version tags are clearly delineated from other stuff that might happen to start with a number. I guess it just disambiguates a little more than the straight version number by itself.

@dustin
Copy link
Author

dustin commented Dec 17, 2009

Could it perhaps be changed to a SHOULD with a detail of why you prefer it your way?

For three digit numbers as you have them, it seems unlikely to conflict with anything else (short of someone creating a branch with the same name as the version -- though this doesn't seem to prevent that confusion).

@mojombo
Copy link
Contributor

mojombo commented Dec 18, 2009

I've moved the tagging requirement into a sub-spec so you can safely ignore it and still be compliant with the main spec.

haacked pushed a commit that referenced this issue Nov 10, 2014
proofread the first part
haacked pushed a commit that referenced this issue Dec 5, 2014
haacked pushed a commit that referenced this issue Jan 28, 2016
lang/cs: minor grammar corrections, added missing paragraph in Why use... section
@steshaw
Copy link

steshaw commented Aug 12, 2016

@mojombo wondering if that sub-spec is public somewheres?

@mojombo
Copy link
Contributor

mojombo commented Aug 12, 2016

You can see what it looked like in the 1.0.0 spec, though it was removed in later releases:

http://semver.org/spec/v1.0.0.html#tagging-specification-semvertag

alexandrtovmach pushed a commit that referenced this issue Jan 28, 2021
Updated language, translation of RFC 2119 terms
alexandrtovmach pushed a commit that referenced this issue May 10, 2021
@cschlote
Copy link

cschlote commented Aug 3, 2022

As we currently start a discussion on this issue at work, I'd like to add this link: #50

So the reason why the SemVerTag was removed from the SemVer spec is, that it is out of scope how tags are setup for the different version control systems.

And: Each developer team can use any kind of tag scheme for their version control system, e.g. "v1.2.3" or "release-1.2.3" or "v1.2.3-foo" as long as the embedded SemVer tuple conforms to the SemVer spec.

Using the bare SemVer Tuple is just an easy to parse and also the most simple option. But using a prefix like 'v' can help to "just disambiguates (it) a little more than the straight version number by itself."

For some years now I use the scheme 'v1.2.3' for my projects in Git. For most other revision systems this should work, too. It allows filtering the output of 'git tag' with grep to just geht a list of release tags, while ignoring all other tags for other purposes. Filtering the bare SemVer number requires more effort and more complex regex expressions.

This issue was closed.
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

No branches or pull requests

4 participants