File: Makefile

package info (click to toggle)
gitolite 2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,368 kB
  • sloc: perl: 2,868; sh: 1,249; python: 143; makefile: 81
file content (21 lines) | stat: -rw-r--r-- 612 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 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...

branch := $(shell git rev-parse --abbrev-ref HEAD)

$(branch):	$(branch).tar

.GITOLITE-VERSION:
	@touch conf/VERSION

%.tar:	.GITOLITE-VERSION
	git describe --tags --long $* > conf/VERSION
	git archive $* > $@
	tar -r -f $@ conf/VERSION
	rm conf/VERSION
	cp -v $@ /tmp