aboutsummaryrefslogtreecommitdiffstats
path: root/mk/Maintainer.mk
blob: dc4b4bb597bf2449c2b1054ca654fbaa59c83aca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# just some maintainer stuff for me ...
########################################################################

make-sync-dir = $(HOME)/projects/gnu-makefiles

.PHONY: sync
sync:: distclean
	test -d $(make-sync-dir)
	rm -f $(srcdir)/INSTALL $(srcdir)/mk/*.mk
	cp -v $(make-sync-dir)/INSTALL $(srcdir)/.
	cp -v $(make-sync-dir)/*.mk $(srcdir)/mk
	chmod 444 $(srcdir)/INSTALL $(srcdir)/mk/*.mk


repository  := $(shell basename $(PWD))
usetito     := $(shell if test -d .tito; then echo yes; else echo no; fi)
release-dir ?= $(HOME)/projects/Releases
release-pub ?= bigendian.kraxel.org:/public/vhosts/www.kraxel.org/releases/$(repository)
tarball      = $(release-dir)/$(repository)-$(VERSION).tar

ifeq ($(usetito),yes)

.PHONY: release
release:
	@echo "tito config found, so use this ;)"

else

$(tarball).gz:
	git tag -m "release $(VERSION)" "$(VERSION)"
	git push --tags
	git archive --format=tar --prefix=$(repository)-$(VERSION)/ \
		-o $(tarball) $(VERSION)
	gzip $(tarball)

$(tarball).gz.asc: $(tarball).gz
	gpg --detach-sign --armor $(tarball).gz

.PHONY: release
release: $(tarball).gz
	scp $(tarball).gz* $(release-pub)

endif