-
Notifications
You must be signed in to change notification settings - Fork 23
/
build.clj
40 lines (37 loc) · 1.48 KB
/
build.clj
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
(ns build
(:require [shared]
[deps-deploy.deps-deploy :as dd]
[clojure.tools.build.api :as b]))
(def lib 'nubank/matcher-combinators)
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def version (shared/version))
(def jar-file (format "target/%s-%s.jar" (name lib) version))
(defn jar [_]
(b/delete {:path class-dir})
(b/delete {:path jar-file})
(println "Writing pom:" jar-file)
(b/write-pom {:class-dir class-dir
:lib lib
:version version
:basis basis
:scm {:url "http://github.com/nubank/matcher-combinators"
:connection "scm:git:git://github.com/nubank/matcher-combinators.git"
:developerConnection "scm:git:ssh://[email protected]/nubank/matcher-combinators.git"
:tag version}
:src-dirs ["src"]
:pom-data [[:licenses
[:license
[:name "Apache License, Version 2.0"]
[:url "http://www.apache.org/licenses/LICENSE-2.0"]]]]})
(b/copy-dir {:src-dirs ["src/clj" "src/cljc" "resources"]
:target-dir class-dir})
(b/jar {:class-dir class-dir
:jar-file jar-file}))
(defn deploy!
"Deploy built jar to clojars"
[& _args]
(jar nil)
(dd/deploy {:installer :remote
:artifact jar-file
:pom-file (b/pom-path {:lib lib :class-dir class-dir})}))