-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (34 loc) · 1.15 KB
/
Makefile
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
44
45
46
47
48
APPNAME = "futils"
VERSION = "1.2.3"
.PHONY: watch default docs deploy test test-clj sig jar pom clean tag
default: docs
docs:
bin/docs
push-docs:
git subtree push --prefix=docs docs master
test-clj:
bin/test --no-profiling
test:
@$(MAKE) test-clj
pom: pom.xml
clojure -Spom && awk 'NF > 0' pom.xml > pom.new.xml && mv -f pom.new.xml pom.xml
mvn versions:set versions:commit -DnewVersion="$(VERSION)"
rm -f pom.xml.asc
$(APPNAME).jar: pom.xml
clojure -Apack -m mach.pack.alpha.skinny --no-libs --project-path $(APPNAME).jar
jar: $(APPNAME).jar
sig: pom.xml
rm -f pom.xml.asc
gpg2 --armor --detach-sig pom.xml
tag: pom.xml
git tag -s "$(VERSION)" -m "Release $(VERSION)"
deploy:
@$(MAKE) clean
@$(MAKE) pom
@$(MAKE) jar
mvn gpg:sign-and-deploy-file -Dfile=$(APPNAME).jar -DrepositoryId=clojars -Durl=https://clojars.org/repo -DpomFile=pom.xml
clean:
rm -f $(APPNAME).jar pom.xml.asc
.PHONY: list
list:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs