3
3
4
4
# Set bash instead of sh for the @if [[ conditions,
5
5
# and use the usual safety flags:
6
- SHELL = /bin/bash -Ee
6
+ SHELL = /bin/bash -Eex
7
7
8
8
CLOJURE_VERSION ?= 1.12
9
+ NREPL_VERSION ?= 1.4
10
+ COMMON_PROFILES = "+$(CLOJURE_VERSION ) ,+nrepl-$(NREPL_VERSION ) "
9
11
TEST_PROFILES ?= "-user,-dev,+test"
10
12
11
13
# We need Java sources to test Java parsing functionality, but the Docker images
@@ -39,42 +41,40 @@ target/srcdeps: project.clj
39
41
# Remove cljfmt.main because it depends on tools.cli which we explicitly removed.
40
42
rm -f target/srcdeps/cider/nrepl/inlined/deps/cljfmt/*/cljfmt/main.clj
41
43
42
- test_impl : copy-sources-to-jdk
43
- lein with-profile $(TEST_PROFILES ) ,+ $( CLOJURE_VERSION ) test
44
+ quick-test : copy-sources-to-jdk
45
+ lein with-profile $(COMMON_PROFILES ) , $( TEST_PROFILES ) test
44
46
45
47
test : target/srcdeps
46
- @make test_impl TEST_PROFILES=" $( TEST_PROFILES) ,+plugin.mranderson/config"
47
-
48
- quick-test : test_impl
48
+ lein with-profile $(COMMON_PROFILES ) ,$(TEST_PROFILES ) ,+plugin.mranderson/config test
49
49
50
50
eastwood :
51
- lein with-profile -user,-dev,+ $( CLOJURE_VERSION ) ,+deploy,+eastwood eastwood
51
+ lein with-profile -user,-dev,$( COMMON_PROFILES ) ,+deploy,+eastwood eastwood
52
52
53
53
cljfmt :
54
- lein with-profile -user,-dev,+ $( CLOJURE_VERSION ) ,+cljfmt cljfmt check
54
+ lein with-profile -user,-dev,$( COMMON_PROFILES ) ,+cljfmt cljfmt check
55
55
56
56
cljfmt-fix :
57
- lein with-profile -user,-dev,+ $( CLOJURE_VERSION ) ,+cljfmt cljfmt fix
57
+ lein with-profile -user,-dev,$( COMMON_PROFILES ) ,+cljfmt cljfmt fix
58
58
59
59
.make_kondo_prep : project.clj .clj-kondo/config.edn
60
- CIDER_NO_MRANDERSON=" true" CIDER_NO_PEDANTIC=" true" lein with-profile -user,-dev,+test,+clj-kondo,+deploy,+ $( CLOJURE_VERSION ) clj-kondo --copy-configs --dependencies --lint ' $$classpath' > $@
60
+ CIDER_NO_MRANDERSON=" true" CIDER_NO_PEDANTIC=" true" lein with-profile -user,-dev,+test,+clj-kondo,+deploy,$( COMMON_PROFILES ) clj-kondo --copy-configs --dependencies --lint ' $$classpath' > $@
61
61
62
62
kondo : .make_kondo_prep clean
63
- CIDER_NO_MRANDERSON=" true" CIDER_NO_PEDANTIC=" true" lein with-profile -user,-dev,+test,+clj-kondo,+deploy,+ $( CLOJURE_VERSION ) clj-kondo
63
+ CIDER_NO_MRANDERSON=" true" CIDER_NO_PEDANTIC=" true" lein with-profile -user,-dev,+test,+clj-kondo,+deploy,$( COMMON_PROFILES ) clj-kondo
64
64
65
65
lint : kondo cljfmt eastwood
66
66
67
67
# PROJECT_VERSION=x.y.z make install
68
68
install : dump-version check-install-env target/srcdeps
69
- CIDER_NO_PEDANTIC=" true" lein with-profile -user,-dev,+ $( CLOJURE_VERSION ) ,+plugin.mranderson/config install
69
+ CIDER_NO_PEDANTIC=" true" lein with-profile -user,-dev,$( COMMON_PROFILES ) ,+plugin.mranderson/config install
70
70
71
71
# PROJECT_VERSION=x.y.z make fast-install
72
72
fast-install : dump-version check-install-env
73
- lein with-profile -user,-dev,+ $( CLOJURE_VERSION ) install
73
+ lein with-profile -user,-dev,$( COMMON_PROFILES ) install
74
74
75
75
smoketest : install
76
76
cd test/smoketest && \
77
- lein with-profile -user,-dev,+$(CLOJURE_VERSION ) uberjar && \
77
+ lein with-profile -user,-dev,$(COMMON_PROFILES ) uberjar && \
78
78
java -jar target/smoketest-0.1.0-SNAPSHOT-standalone.jar
79
79
80
80
# Deployment is performed via CI by creating a git tag prefixed with "v".
@@ -87,7 +87,7 @@ deploy: check-env target/srcdeps
87
87
rm -f .no-mranderson
88
88
export PROJECT_VERSION=$$(echo "$(CIRCLE_TAG ) " | sed 's/^v//' ) ; \
89
89
echo " \" $$ PROJECT_VERSION\" " > resources/cider/nrepl/version.edn; \
90
- lein with-profile -user,-dev,-provided,+ $( CLOJURE_VERSION ) ,+plugin.mranderson/config deploy clojars
90
+ lein with-profile -user,-dev,-provided,$( COMMON_PROFILES ) ,+plugin.mranderson/config deploy clojars
91
91
92
92
check-env :
93
93
ifndef CLOJARS_USERNAME
0 commit comments