forked from clojure-emacs/cider-nrepl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (56 loc) · 2.38 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
.PHONY: test-clj test-cljs eastwood cljfmt cloverage install smoketest release deploy clean
VERSION ?= 1.9
export CLOVERAGE_VERSION = 1.0.11-SNAPSHOT
# The test-cljs target needs to be modified if working with JDK9
JAVA_VERSION = $(shell lein with-profile +sysutils \
sysutils :java-version-simple | cut -d " " -f 2)
.source-deps:
lein source-deps
touch .source-deps
source-deps: .source-deps
test-clj: .source-deps smoketest
lein with-profile +$(VERSION),+plugin.mranderson/config,+test-clj test
test-cljs: .source-deps
if [ "$(JAVA_VERSION)" = "9" ]; then \
lein with-profile +$(VERSION),+plugin.mranderson/config,+test-cljs \
update-in :jvm-opts concat '["--add-modules" "java.xml.bind"]' \
-- test; \
else \
lein with-profile +$(VERSION),+plugin.mranderson/config,+test-cljs test; \
fi
eastwood:
lein with-profile +$(VERSION),+test-clj,+test-cljs,+eastwood eastwood \
"{:namespaces [:source-paths] :exclude-namespaces [cider-nrepl.plugin]}"
cljfmt:
lein with-profile +$(VERSION),+test-clj,+test-cljs,+cljfmt cljfmt check
# Cloverage can't handle some of the code in this project. For now we
# must filter problematic namespaces (`-e`) and tests (`-t`) from
# instrumentation. Note: this means for now coverage reporting isn't
# exact. See issue #457 for details.
cloverage:
lein with-profile +$(VERSION),+test-clj,+cloverage cloverage --codecov \
-e ".*java.parser" \
-e "cider-nrepl.plugin" \
-e ".*util.instrument" \
-t "^((?!debug-integration-test).)*$$"
install: .source-deps
lein with-profile +$(VERSION),+plugin.mranderson/config install
smoketest: install
cd test/smoketest && \
lein with-profile +$(VERSION) uberjar && \
java -jar target/smoketest-0.1.0-SNAPSHOT-standalone.jar
# When releasing, the BUMP variable controls which field in the
# version string will be incremented in the *next* snapshot
# version. Typically this is either "major", "minor", or "patch".
BUMP ?= patch
release:
lein with-profile +$(VERSION) release $(BUMP)
# Deploying requires the caller to set environment variables as
# specified in project.clj to provide a login and password to the
# artifact repository.
deploy: .source-deps
lein with-profile +$(VERSION),+plugin.mranderson/config deploy clojars
clean:
lein clean
cd test/smoketest && lein clean
rm -f .source-deps