Skip to content

Commit 95330e3

Browse files
plexusbbatsov
authored andcommitted
Makefile: rename VERSION to CLOJURE_VERSION
For the sake of clarity and unambiguity, add some namespacing to this env var.
1 parent c350efb commit 95330e3

File tree

2 files changed

+25
-31
lines changed

2 files changed

+25
-31
lines changed

.travis.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ script:
88
- make $TARGET
99
env:
1010
matrix:
11-
- VERSION=1.8 TARGET=test-clj
12-
- VERSION=1.8 TARGET=test-cljs
13-
- VERSION=1.9 TARGET=test-clj
14-
- VERSION=1.9 TARGET=test-cljs
11+
- CLOJURE_VERSION=1.8 TARGET=test-clj
12+
- CLOJURE_VERSION=1.8 TARGET=test-cljs
13+
- CLOJURE_VERSION=1.9 TARGET=test-clj
14+
- CLOJURE_VERSION=1.9 TARGET=test-cljs
1515
global:
1616
- secure: "bCp4gU7XgeqLnqKwEpJarnKPbGljHyLE2rZnub4mEHD8kcvh6LoEkG/2QCtnSETj8zrQJwyMuEDGUwPgjmzQ/aEn6UiIYmv7ka6QnLBxOxhqQTbDtG7HssfkeT5b67LgOyQX7ejK88vnmH+OeWXM7kOOvUwVy5BVgsYyr2f1cGU="
1717
- secure: "D2Ie7dUZ9nQOIWtkRl2XWZeijSL8expUXP3GziSqQV1scJzwexxnUsRvWOkc2YU8+6IIGz9tcyt9RrEFUVF31VZgRSHh8P5rGGCzI2l99djKhYFfSErElwgoAJZFtOzougZK66/Gtb5uDo5L/wlKHkl4st3miqm+mEvfJITDjRQ="
@@ -32,30 +32,30 @@ stages:
3232
jobs:
3333
include:
3434
# Test OpenJDK against latest Clojure stable
35-
- env: VERSION=1.9 TARGET=test-clj
35+
- env: CLOJURE_VERSION=1.9 TARGET=test-clj
3636
jdk: openjdk8
37-
- env: VERSION=1.9 TARGET=test-cljs
37+
- env: CLOJURE_VERSION=1.9 TARGET=test-cljs
3838
jdk: openjdk8
3939

4040
# Test Clojure master against a single JDK
41-
- env: VERSION=master TARGET=test-clj
41+
- env: CLOJURE_VERSION=master TARGET=test-clj
4242
jdk: oraclejdk8
43-
- env: VERSION=master TARGET=test-cljs
43+
- env: CLOJURE_VERSION=master TARGET=test-cljs
4444
jdk: oraclejdk8
4545

4646
# Coverage analysis
47-
- env: VERSION=1.9 TARGET=cloverage
47+
- env: CLOJURE_VERSION=1.9 TARGET=cloverage
4848
jdk: oraclejdk8
4949
after_success: bash <(curl -s https://codecov.io/bash) -f target/coverage/codecov.json
5050

5151
# Eastwood linter
5252
- stage: check
53-
env: VERSION=1.9 TARGET=eastwood
53+
env: CLOJURE_VERSION=1.9 TARGET=eastwood
5454
jdk: oraclejdk8
5555

5656
# Check cljfmt
5757
- stage: check
58-
env: VERSION=1.9 TARGET=cljfmt
58+
env: CLOJURE_VERSION=1.9 TARGET=cljfmt
5959
jdk: oraclejdk8
6060

6161
# Deployment
@@ -65,6 +65,6 @@ jobs:
6565

6666
fast_finish: true # don't wait for allowed failures before build finish
6767
allow_failures:
68-
- env: VERSION=master TARGET=test-clj
69-
- env: VERSION=master TARGET=test-cljs
70-
- env: VERSION=1.9 TARGET=cloverage
68+
- env: CLOJURE_VERSION=master TARGET=test-clj
69+
- env: CLOJURE_VERSION=master TARGET=test-cljs
70+
- env: CLOJURE_VERSION=1.9 TARGET=cloverage

Makefile

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.PHONY: test-clj test-cljs eastwood cljfmt cloverage install smoketest release deploy clean check_node
22

3-
VERSION ?= 1.9
3+
CLOJURE_VERSION ?= 1.9
44
export CLOVERAGE_VERSION = 1.0.13
55

66
# The test-cljs target needs to be modified if working with JDK9
@@ -14,23 +14,17 @@ JAVA_VERSION = $(shell lein with-profile +sysutils \
1414
source-deps: .source-deps
1515

1616
test-clj: .source-deps smoketest
17-
lein with-profile +$(VERSION),+plugin.mranderson/config,+test-clj test
17+
lein with-profile +$(CLOJURE_VERSION),+plugin.mranderson/config,+test-clj test
1818

19-
test-cljs: .source-deps
20-
if [ "$(JAVA_VERSION)" = "9" ]; then \
21-
lein with-profile +$(VERSION),+plugin.mranderson/config,+test-cljs \
22-
update-in :jvm-opts concat '["--add-modules" "java.xml.bind"]' \
23-
-- test; \
24-
else \
25-
lein with-profile +$(VERSION),+plugin.mranderson/config,+test-cljs test; \
26-
fi
19+
test-cljs: .source-deps check_node
20+
lein with-profile +$(CLOJURE_VERSION),+plugin.mranderson/config,+test-cljs test
2721

2822
eastwood:
29-
lein with-profile +$(VERSION),+test-clj,+test-cljs,+eastwood eastwood \
23+
lein with-profile +$(CLOJURE_VERSION),+test-clj,+test-cljs,+eastwood eastwood \
3024
"{:namespaces [:source-paths] :exclude-namespaces [cider-nrepl.plugin]}"
3125

3226
cljfmt:
33-
lein with-profile +$(VERSION),+test-clj,+test-cljs,+cljfmt cljfmt check
27+
lein with-profile +$(CLOJURE_VERSION),+test-clj,+test-cljs,+cljfmt cljfmt check
3428

3529

3630
# Cloverage can't handle some of the code in this project. For now we
@@ -39,18 +33,18 @@ cljfmt:
3933
# exact. See issue #457 for details.
4034

4135
cloverage:
42-
lein with-profile +$(VERSION),+test-clj,+cloverage cloverage --codecov \
36+
lein with-profile +$(CLOJURE_VERSION),+test-clj,+cloverage cloverage --codecov \
4337
-e ".*java.parser" \
4438
-e "cider-nrepl.plugin" \
4539
-e ".*util.instrument" \
4640
-t "^((?!debug-integration-test).)*$$"
4741

4842
install: .source-deps
49-
lein with-profile +$(VERSION),+plugin.mranderson/config install
43+
lein with-profile +$(CLOJURE_VERSION),+plugin.mranderson/config install
5044

5145
smoketest: install
5246
cd test/smoketest && \
53-
lein with-profile +$(VERSION) uberjar && \
47+
lein with-profile +$(CLOJURE_VERSION) uberjar && \
5448
java -jar target/smoketest-0.1.0-SNAPSHOT-standalone.jar
5549

5650
check_node:
@@ -63,14 +57,14 @@ check_node:
6357
BUMP ?= patch
6458

6559
release:
66-
lein with-profile +$(VERSION) release $(BUMP)
60+
lein with-profile +$(CLOJURE_VERSION) release $(BUMP)
6761

6862
# Deploying requires the caller to set environment variables as
6963
# specified in project.clj to provide a login and password to the
7064
# artifact repository.
7165

7266
deploy: .source-deps
73-
lein with-profile +$(VERSION),+plugin.mranderson/config deploy clojars
67+
lein with-profile +$(CLOJURE_VERSION),+plugin.mranderson/config deploy clojars
7468

7569
clean:
7670
lein clean

0 commit comments

Comments
 (0)