[OpenAFS-devel] git+versioning proposal

Derrick Brashear shadow@gmail.com
Tue, 16 Mar 2010 00:58:46 -0400


Credit where due that I forgot; it was discussion with Simon earlier
today that had this in the fore of my mind as I did yet another
regen.sh

On Tue, Mar 16, 2010 at 12:50 AM, Russ Allbery <rra@stanford.edu> wrote:
> Derrick Brashear <shadow@gmail.com> writes:

[]
> Rather than using the SHA1 of the last commit, use the output from git
> describe, possibly munged. =A0It looks like:
>
> =A0 =A0openafs-devel-1_5_72-134-g6bfca9c
>
> or, in other words:
>
> =A0 =A0<tag>-<commit-count>-<sha1>
>
> where <tag> is the last tag on the current branch, <commit-count> is the
> number of commits made since that tag, and <sha1> is the hash of the top
> commit.

>> Proposal: each release will be done on a branch containing just the
>> version number changes
>
> There is a hack that one can do with recent Autoconf that will let you ru=
n
> an external command to determine the version number at the time of runnin=
g
> autoconf, which would make this work for any straight build rather than
> requiring special work in the release script and running it to do the
> build.

Fine, alternate proposal:
Make regen.sh generate a file in the src/cf dir for any build which
dtrt, and check in no version whatsoever?

Plus: Works with any autoconf. can munge git describe. Can work
backward in time.
Minus: requires you to run regen and not guess which commands you need.
Minus-plus: many people guess badly. If they guess badly, they're
immediately lose.