forked from grammarly/omniconf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.boot
More file actions
57 lines (48 loc) · 1.94 KB
/
build.boot
File metadata and controls
57 lines (48 loc) · 1.94 KB
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
(task-options!
pom {:project 'com.grammarly/omniconf
:version "0.3.3-SNAPSHOT"
:description "Configuration library for Clojure that favors explicitness"
:license {"Apache License, Version 2.0"
"http://www.apache.org/licenses/LICENSE-2.0"}
:url "https://github.com/grammarly/omniconf"
:scm {:url "https://github.com/grammarly/omniconf"}})
(def clj-version (or (System/getenv "BOOT_CLOJURE_VERSION") "1.10.0"))
(def base-deps
[['org.clojure/clojure clj-version :scope "provided"]])
(def ssm-deps
'[[com.amazonaws/aws-java-sdk-core "1.11.536"]
[com.amazonaws/aws-java-sdk-ssm "1.11.536"]])
(def dev-deps
'[[boot/core "2.8.2" :scope "provided"]
[metosin/bat-test "0.4.2" :scope "test"]])
(set-env! :dependencies (concat base-deps ssm-deps dev-deps)
:source-paths #{"src/"}
:test-paths #{"test/"}
:target-path "target/")
(require 'boot.util)
(ns-unmap 'boot.user 'test)
(deftask test
"Run unit tests."
[j junit-path PATH str "If provided, produce JUnit XML in PATH."]
(set-env! :source-paths #(into % (get-env :test-paths)))
(require 'metosin.bat-test)
(let [reporters (if junit-path
[:pretty {:type :junit :output-to junit-path}]
[:pretty])]
((resolve 'metosin.bat-test/bat-test) :report reporters)))
(deftask deploy
"Build and deploy the JAR files."
[]
(comp (sift :add-resource (get-env :source-paths)
:include #{#"^omniconf/core.clj$"})
(pom :dependencies base-deps)
(jar)
(push :repo "clojars")
;; Build SSM jar
(sift :add-resource (get-env :source-paths)
:include #{#"^omniconf/ssm.clj$"})
(pom :project 'com.grammarly/omniconf.ssm
:description "Module for Omniconf to support Amazon SSM as a configuration source"
:dependencies ssm-deps)
(jar)
(push :repo "clojars")))