On Saturday 2014-01-11 14:53, Adam Spiers wrote:
OK, so let's assume I have a bunch of tags like: v1.0.1 v1.0.2 etc. We are looking for a programmatic solution which can be automated by tools such as tar_scm. You are presumably suggesting to use something like git describe --match='v[0-9]*.[0-9]'
right?
With the match pattern be an argument to whatever script calls that, because that is invariably user-specific, which is also why the match pattern was an argument in the perl script I had posted. Hence, all I really asked of the user is to name his tags such and such that he himself can give a reasonable short algorithm to distinguish them.
And this glob is necessarily brittle, because very often the person maintaining the upstream repository containing the tags is different to the person maintaining the downstream package,
An upstream can always screw up downstream -- heck, they do all the time with something as banal as release tarballs' filenames, which affects our URIs in Source: lines in .spec files, and /debian/watch. So, 'lo and behold, git tags are no different.
Regardless, that is not a valid solution, because it breaks instantly when the first tag is introduced to the repository.
And why would that be?
Because the tag offset will reset to zero, violating the requirement that it increases strictly monotonically.
The offset may move to zero, but in the same go, the tag is increased by "one". Making %version go from 2013.1-1500-gxxxx (2013.1~git1500) to 2013.2-1-gxxxx (2013.2~git1) is perfectly fine. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org