-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.clj
30 lines (27 loc) · 1.15 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
(ns build
(:require [clojure.string :as str]
[clojure.tools.build.api :as b])
(:import (java.time LocalDate)))
(def lib 'no.anteo/broch)
(def version (str/replace (str (LocalDate/now)) #"-" "."))
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def jar-file "target/deploy.jar")
(defn clean [_]
(b/delete {:path "target"}))
(defn jar [_]
(b/write-pom {:class-dir class-dir
:lib lib
:version version
:basis basis
:src-dirs ["src"]
:scm {:url "https://github.com/anteoas/broch"
:connection "scm:git:git://github.com/anteoas/broch.git"
:developerConnection "scm:git:ssh://git@github.com/anteoas/broch.git"
:tag (str "v" version)}})
(b/copy-file {:src (str class-dir "/META-INF/maven/no.anteo/broch/pom.xml")
:target "./pom.xml"})
(b/copy-dir {:src-dirs ["src" "resources"]
:target-dir class-dir})
(b/jar {:class-dir class-dir
:jar-file jar-file}))