Hi,

I am trying to make a header which depends on the actual git hash. It would 
be also nice to indicate whether the repo is dirty or not. 
(This would be handy because we could generate a log entry which contains 
our deployed process' version. We might have more prcocesses with different 
versions deployed.)
So far I've got the following:
strace -e trace=open git rev-parse HEAD
...
open(".git/HEAD", O_RDONLY)             = 3
open(".git/refs/heads/gitHash", O_RDONLY) = 3
open(".git/packed-refs", O_RDONLY)      = 3
...

Therefore I tried with this Tupfile:
include_rules
: $(PROJECT_ROOT)/.git/HEAD $(PROJECT_ROOT)/.git/refs/heads/* 
$(PROJECT_ROOT)/.git/packed-refs |> ./gitstuff.sh > %o |> gitHash.h
PROJECT_ROOT is defined in the upper most Tupfile. gitstuff is the script 
which wraps git rev-parse.

But tup upd is not willing to handle any hidden files. :(

So my next idea was to create a symlink of .git (ln -s .git git) and 
replace '.git' with 'git' in the Tupfile. However I've got the following 
error:
tup error: Expected node 'refs' to be in directory 'git', but it is not 
there.
tup error: Failed to find directory ID for dir '../git/refs/heads/*' 
relative to 518

Any idea how to move on? Is it possible at all to do such thing with tup?

Many Thanks,
Gábor



-- 
-- 
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to