diff options
author | Sitaram Chamarty <sitaram@sita-lt.atc.tcs.com> | 2009-09-21 19:01:47 +0530 |
---|---|---|
committer | Sitaram Chamarty <sitaram@sita-lt.atc.tcs.com> | 2009-09-21 19:01:47 +0530 |
commit | 4879a03c60353a65257add190fdbd2fddd7dd69c (patch) | |
tree | 8773b96f8aa2aff6a875ecf61d45a940659bd48e /Makefile | |
parent | compile+doc/3: deal with older gits (diff) | |
download | gitolite-gentoo-4879a03c60353a65257add190fdbd2fddd7dd69c.tar.gz gitolite-gentoo-4879a03c60353a65257add190fdbd2fddd7dd69c.tar.bz2 gitolite-gentoo-4879a03c60353a65257add190fdbd2fddd7dd69c.zip |
Makefile wraps "git archive" to record "git describe" output in tar
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..730fa72 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +# this is a simple wrapper around "git archive" using make + +# "make [refname].tar" produces a tar of refname, then adds a file containing +# the "git describe" output for that refname to the tar. This lets you say +# "cat .GITOLITE-VERSION" to find out which ref produced this tar + +# Note: I'm not sure if that "-r" is a GNU tar extension... + +.GITOLITE-VERSION: + @touch .GITOLITE-VERSION + +%.tar: .GITOLITE-VERSION + git describe --all --long $* > .GITOLITE-VERSION + git archive $* > $@ + tar -r -f $@ .GITOLITE-VERSION + rm .GITOLITE-VERSION |