2009-09-21 15:31:47 +02:00
|
|
|
# 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...
|
|
|
|
|
2010-05-14 07:56:31 +02:00
|
|
|
branch := $(shell git rev-parse --abbrev-ref HEAD)
|
|
|
|
|
|
|
|
$(branch): $(branch).tar
|
|
|
|
|
2009-09-21 15:31:47 +02:00
|
|
|
.GITOLITE-VERSION:
|
2010-02-10 08:05:01 +01:00
|
|
|
@touch conf/VERSION
|
2009-09-21 15:31:47 +02:00
|
|
|
|
|
|
|
%.tar: .GITOLITE-VERSION
|
2010-02-10 08:05:01 +01:00
|
|
|
git describe --tags --long $* > conf/VERSION
|
2009-09-21 15:31:47 +02:00
|
|
|
git archive $* > $@
|
2010-02-10 08:05:01 +01:00
|
|
|
tar -r -f $@ conf/VERSION
|
|
|
|
rm conf/VERSION
|
2010-05-14 07:56:31 +02:00
|
|
|
cp -v $@ /tmp
|