Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Normalize version tags #29

Closed
schwern opened this Issue · 3 comments

1 participant

@schwern
Owner

So 1.2.3 is tagged as v1.2.3. This makes versions stand out, follows the git semi-standard, and prevents versions like .01 from choking git.

v1.2.3 is left as v1.2.3.

@schwern
Owner

I've decided to prefix the versions with version/. This prefix might change (for example, cpan-version/ but the basic idea is the same.

It still seems worth normalizing the versions, if nothing else so the version tags sort well. A module with 1.2.2, v1.2.3 and 1.2.4 wouldn't sort properly without normalization.

@schwern
Owner

There's several needs here with versioning.

  1. Go from the CPAN release version to the gitpan tag with a minimum (or no) processing (and vice versa)
  2. Sort versions properly as gitpan tags.
  3. Provide a list of all released versions with no duplicates.

I think we need two tags for each committed release. One contains the version exactly as it exists on CPAN. This solves 1. Prefix it with cpan_version/.

The other contains the gitpan normalized version. This solves 2. Prefix it with gitpan_version/.

Either solve 3.

For example, Foo-Bar-v1.2.3 might be tagged as cpan_version/v1.2.3 and gitpan_version/1.2.3. Gitpan might even go as far as to convert 1.005000 to gitpan_version/1.5.0, but that's probably too much guesswork.

@schwern schwern changed the title from Normalize version tags with a v prefix to Normalize version tags
@schwern schwern added this to the Pre-launch 2.0 milestone
@schwern schwern referenced this issue from a commit
@schwern schwern Move making versions tag safe into Gitpan::Git.
Gitpan::Release->normalize_version wasn't really normalizing the version
as #29 intends, it was just making it safe for tagging.  Every version
tag, normalized or not, will need that.  It doesn't really belong in
Gitpan::Release and it's not really normalization, so put it into
Gitpan::Git instead.
a36ff4a
@schwern schwern referenced this issue from a commit
@schwern schwern Add Gitpan::Release->gitpan_version for version normalization.
I've picked a small release with different version schemes to test with.

For #29
07f95ca
@schwern
Owner

There might be more normalization later, but this sets up the basic infrastructure and handles the most common case.

@schwern schwern closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.