ajoberstar / reckon

Infer a project's version from your Git repository.
Apache License 2.0
185 stars 28 forks source link

Extend reckonTagCreate to prefix tags with v #105

Closed orjan closed 5 years ago

orjan commented 5 years ago

Based on the answer in the this question https://stackoverflow.com/q/21639437/191975 we chose to prefix all our tags with v like v1.2.3.

Are you open for having an extension point for reckonTagCreate so it's possible to create prefixed tags? I can imagine different solutions for this everything from tagPrefix to more advanced templating solutions.

ajoberstar commented 5 years ago

SemVer doesn't mandate or suggest anything about tag names (anymore, see below). I'm not open to a switch for adding the v. I've been trying to minimize the number of knobs in reckon (compared to gradle-git's release functionality), so I'm generally hesitant about any of these kinds of proposals.

However, there's a possibility that #54 and some variant of what was proposed in #99 could lead to generic tag parsing and rendering hooks.

Granted, it's not something I've considered a high priority. Generally, I'm open to contributions, though in this case the question of where to provide these hooks is complicated with lingering design thoughts (#54 has some of the history there).

Background

The accepted answer references SemVer, but it was only in SemVer 1.0.0 that the tagging format was in the spec. In semver/semver#1 it was considered a mistake to be part of SemVer, and removed prior to 2.0.0 characterized as a "distraction".

orjan commented 5 years ago

Thanks for the explanation, I fully understand the trade off to reduce complexity.

We just picked the v prefix once upon a time and there's nothing holy about it.