Repository navigation
Expand file tree
/
Copy pathbuild.clj
More file actions
46 lines (41 loc) · 1.83 KB
/
Copy pathbuild.clj
File metadata and controls
46 lines (41 loc) · 1.83 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
(ns build
"Build + Clojars deploy for jose-clj (tools.build + deps-deploy).
Usage:
clojure -T:build jar
clojure -T:build deploy ; needs CLOJARS_USERNAME / CLOJARS_PASSWORD"
(:require [clojure.tools.build.api :as b]
[deps-deploy.deps-deploy :as dd]))
(def lib 'net.clojars.savya/cljgrapht)
(def version "1.4.2")
(def class-dir "target/classes")
(def basis (delay (b/create-basis {:project "deps.edn"})))
(def jar-file (format "target/%s-%s.jar" (name lib) version))
(defn clean [_]
(b/delete {:path "target"})
(b/delete {:path "pom.xml"}))
(defn jar [_]
(clean nil)
(b/write-pom {:class-dir class-dir
:lib lib
:version version
:basis @basis
:src-dirs ["src"]
:scm {:url "https://github.com/savyalabs/cljgrapht"
:connection "scm:git:https://github.com/savyalabs/cljgrapht.git"
:developerConnection "scm:git:ssh://git@github.com/savyalabs/cljgrapht.git"
:tag (str "v" version)}
:pom-data [[:description "Idiomatic Clojure graph library backed by JGraphT: fast algorithms over Clojure-value vertices"]
[:url "https://github.com/savyalabs/cljgrapht"]
[:licenses
[:license
[:name "Eclipse Public License 2.0"]
[:url "https://www.eclipse.org/legal/epl-2.0/"]
[:distribution "repo"]]]]})
(b/copy-dir {:src-dirs ["src" "resources"] :target-dir class-dir})
(b/jar {:class-dir class-dir :jar-file jar-file})
(println "Wrote" jar-file))
(defn deploy [_]
(jar nil)
(dd/deploy {:installer :remote
:artifact jar-file
:pom-file (b/pom-path {:lib lib :class-dir class-dir})}))