[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: version format for git snapshot



On Mon, 14 Sep 2015 07:51:09 +0200
Thomas Koch <thomas@koch.ro> wrote:

> Hi,
> 
> my upstream tagged 0.4 a year ago and I want to package the current
> master commit a5e5f9e that is 24 commits after 0.4. Please assume
> that this makes sense...
> 
> How would you format the upstream part of the packages version
> number? How about 0.4+24+git+a5e5f9e?
> 
> The git describe output is v0.4-24-ga5e5f9e.
> 
> Is there any established best practice?

One of the steps I use is to look at the rev-list to get a sequential
number which is based on the actual commits but is in a sane sequence.

https://git.linaro.org/lava/lava-dispatcher.git/blob/HEAD:/version.py

git rev-list --count HEAD

These are local developer builds, not usually released, but still -
could be useful for someone. As well as sticking the short hash in the
changelog entry, we also append it to the version.

ava-dispatcher 2015.9.3908.875bd74-1 amd64

The rev-list takes care of the hash not being a reliable sort as the
hash is effectively hidden from the sort algorithm. It's added because
it's a simple way of looking up the commit on gitolite etc.

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Attachment: pgp44A_TUWBBl.pgp
Description: OpenPGP digital signature


Reply to: