Noti: tag does not include `v` in the name this time

Created on 6 Jan 2018  ·  7Comments  ·  Source: variadico/noti

I'm not sure if this was intentional but https://github.com/variadico/noti/tags shows all previous tags had a prepended v and 3.0.0 does not.

All 7 comments

IMHO we should all stop prepending our git tags with v for the simple reason that v1.2.3 is not valid SemVer. As long as we prepend with v, we have to do a little extra work to translate git tags into versions, e.g. git describe --tags --abbrev=0 | tr -d 'v'. A git tag shouldn't have to be _translated into_ a version. A git tag should _be_ the version.

On the flip side, the GitHub GUI (Click Draft a new release) suggests tags with v:

Tagging suggestions

It’s common practice to prefix your version names with the letter v. Some good tag names might be v1.0 or v2.3.4.

If the tag isn’t meant for production use, add a pre-release version after the version name. Some good pre-release versions might be v0.2-alpha or v5.9-beta.3.

So good luck getting it to stop :)

https://stackoverflow.com/questions/28605883/why-do-so-many-projects-prepend-v-to-the-git-version-tags

is not valid SemVer

I think it still is. It used to be required apparently.

@y0ssar1an fyi: https://github.com/semver/semver/blob/master/semver.md#is-v123-a-semantic-version

Thanks for prompting me to research this further. Apparently, prepending the v was _required_ in SemVer 1.0.0, but is invalid in SemVer 2.0.0. As you mentioned, the v is some historical cruft coming from pre-git version control systems.

The changelog has always said that this project uses semver. It seems silly to say that, but not actually follow semver. It also makes it easier to parse the version from the tag, which noti does.

So in short, yup, this was on purpose! 😄 Thanks for double checking!

@variadico thanks for clarifying that! For the record, current semver itself says in https://github.com/semver/semver/blob/master/semver.md#is-v123-a-semantic-version

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".

So there is nothing contradictory about having a v in the tag name because semver allows for a distinction between the "tag name" and the "semver version" itself.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

subvillion picture subvillion  ·  6Comments

pascalandy picture pascalandy  ·  6Comments

integrii picture integrii  ·  12Comments

ventz picture ventz  ·  5Comments

tkcranny picture tkcranny  ·  6Comments