> On Jun 30, 2016, at 4:14 PM, Renato Golin via llvm-dev
> <llvm-...@lists.llvm.org> wrote:
>
>
> On 30 Jun 2016 10:20 p.m., "Robinson, Paul" <paul.robin...@sony.com
> <mailto:paul.robin...@sony.com>> wrote:
> > We've since stopped creating the tags, and gotten used to not having
> > them. We do the 'rev-list --count' trick which mainly gets recorded as
> > one component of the version number, and it has been working for us.
>
> Does that work for sub modules inside the umbrella project?
>
> How can you trigger a hook in the umbrella project for commits inside the sub
> modules?
>
First: This is purely about generating sequential revision numbers, it does not
help setting up a server hook to update the submodule references in the meta
repository. The point I am trying to make here is that we only need to solve
the problem of updating the submodule references, and that generating
sequential ID numbers as an alternative to git hashes is no problem.
As far as I can see we need the following operations for sequential ID numbers
and they are all easy enough to perform with git on the client side:
1. Produce revision number for current checkout (to use in tool --version
output):
You can put something like
> echo "#define VERSION $(git rev-list --count HEAD)" > version.h
in your buildsystem
2. Convert git hash to revision number:
git rev-list --count $HASH
3. Convert revision number $NUM to git hash:
git rev-list HEAD | tail -n $NUM | head -n 1
- Matthias
_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev