Skip to content

Commit

Permalink
Makefile: rename VERSION to CLOJURE_VERSION
Browse files Browse the repository at this point in the history
For the sake of clarity and unambiguity, add some namespacing to this env var.
  • Loading branch information
plexus committed Dec 27, 2018
1 parent 6f11411 commit db6fa47
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 31 deletions.
28 changes: 14 additions & 14 deletions .travis.yml
Expand Up @@ -8,10 +8,10 @@ script:
- make $TARGET
env:
matrix:
- VERSION=1.8 TARGET=test-clj
- VERSION=1.8 TARGET=test-cljs
- VERSION=1.9 TARGET=test-clj
- VERSION=1.9 TARGET=test-cljs
- CLOJURE_VERSION=1.8 TARGET=test-clj
- CLOJURE_VERSION=1.8 TARGET=test-cljs
- CLOJURE_VERSION=1.9 TARGET=test-clj
- CLOJURE_VERSION=1.9 TARGET=test-cljs
global:
- secure: "bCp4gU7XgeqLnqKwEpJarnKPbGljHyLE2rZnub4mEHD8kcvh6LoEkG/2QCtnSETj8zrQJwyMuEDGUwPgjmzQ/aEn6UiIYmv7ka6QnLBxOxhqQTbDtG7HssfkeT5b67LgOyQX7ejK88vnmH+OeWXM7kOOvUwVy5BVgsYyr2f1cGU="
- secure: "D2Ie7dUZ9nQOIWtkRl2XWZeijSL8expUXP3GziSqQV1scJzwexxnUsRvWOkc2YU8+6IIGz9tcyt9RrEFUVF31VZgRSHh8P5rGGCzI2l99djKhYFfSErElwgoAJZFtOzougZK66/Gtb5uDo5L/wlKHkl4st3miqm+mEvfJITDjRQ="
Expand All @@ -32,30 +32,30 @@ stages:
jobs:
include:
# Test OpenJDK against latest Clojure stable
- env: VERSION=1.9 TARGET=test-clj
- env: CLOJURE_VERSION=1.9 TARGET=test-clj
jdk: openjdk8
- env: VERSION=1.9 TARGET=test-cljs
- env: CLOJURE_VERSION=1.9 TARGET=test-cljs
jdk: openjdk8

# Test Clojure master against a single JDK
- env: VERSION=master TARGET=test-clj
- env: CLOJURE_VERSION=master TARGET=test-clj
jdk: oraclejdk8
- env: VERSION=master TARGET=test-cljs
- env: CLOJURE_VERSION=master TARGET=test-cljs
jdk: oraclejdk8

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

# Eastwood linter
- stage: check
env: VERSION=1.9 TARGET=eastwood
env: CLOJURE_VERSION=1.9 TARGET=eastwood
jdk: oraclejdk8

# Check cljfmt
- stage: check
env: VERSION=1.9 TARGET=cljfmt
env: CLOJURE_VERSION=1.9 TARGET=cljfmt
jdk: oraclejdk8

# Deployment
Expand All @@ -65,6 +65,6 @@ jobs:

fast_finish: true # don't wait for allowed failures before build finish
allow_failures:
- env: VERSION=master TARGET=test-clj
- env: VERSION=master TARGET=test-cljs
- env: VERSION=1.9 TARGET=cloverage
- env: CLOJURE_VERSION=master TARGET=test-clj
- env: CLOJURE_VERSION=master TARGET=test-cljs
- env: CLOJURE_VERSION=1.9 TARGET=cloverage
28 changes: 11 additions & 17 deletions Makefile
@@ -1,6 +1,6 @@
.PHONY: test-clj test-cljs eastwood cljfmt cloverage install smoketest release deploy clean check_node

VERSION ?= 1.9
CLOJURE_VERSION ?= 1.9
export CLOVERAGE_VERSION = 1.0.13

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

test-clj: .source-deps smoketest
lein with-profile +$(VERSION),+plugin.mranderson/config,+test-clj test
lein with-profile +$(CLOJURE_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
test-cljs: .source-deps check_node
lein with-profile +$(CLOJURE_VERSION),+plugin.mranderson/config,+test-cljs test

eastwood:
lein with-profile +$(VERSION),+test-clj,+test-cljs,+eastwood eastwood \
lein with-profile +$(CLOJURE_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
lein with-profile +$(CLOJURE_VERSION),+test-clj,+test-cljs,+cljfmt cljfmt check


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

cloverage:
lein with-profile +$(VERSION),+test-clj,+cloverage cloverage --codecov \
lein with-profile +$(CLOJURE_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
lein with-profile +$(CLOJURE_VERSION),+plugin.mranderson/config install

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

check_node:
Expand All @@ -63,14 +57,14 @@ check_node:
BUMP ?= patch

release:
lein with-profile +$(VERSION) release $(BUMP)
lein with-profile +$(CLOJURE_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
lein with-profile +$(CLOJURE_VERSION),+plugin.mranderson/config deploy clojars

clean:
lein clean
Expand Down

0 comments on commit db6fa47

Please sign in to comment.