Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,32 @@
(:require [clojure.tools.build.api :as b]
[org.corfield.build :as cb]))

(defn project
(defn project
"apply project default to `opts`"
[opts]
(let [defaults {:lib 'sg.flybot/lasagna-pull
:version (format "0.4.%s" (b/git-count-revs nil))
:scm {:url "https://github.com/flybot-sg/lasagna-pull"}}]
(let [version (format "0.4.%s" (b/git-count-revs nil))
defaults {:lib 'sg.flybot/lasagna-pull
:version version}]
(merge defaults opts)))

(defn tests
(defn pom
[opts]
(let [pom-data
[[:description "Precisely select from deep data structure"]
[:url "https://github.com/flybot-sg/lasagna-pull"]
[:licenses
[:license
[:name "Apache-2.0"]
[:url "https://www.apache.org/licenses/LICENSE-2.0.txt"]]]
[:organization "Flybot Pte Ltd"]]
opts (merge opts
{:basis (b/create-basis {})
:target "target"
:pom-data pom-data})]
(b/write-pom opts)
opts))

(defn tests
"run all tests, for clj and cljs."
[opts]
(-> opts
Expand All @@ -24,6 +41,7 @@
(project)
(cb/clean)
(tests)
(pom)
(cb/jar)))

(defn deploy
Expand Down
3 changes: 2 additions & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@

:build ;build
{:deps
{io.github.seancorfield/build-clj {:git/tag "v0.9.2", :git/sha "9c9f078"}},
{io.github.clojure/tools.build {:mvn/version "0.10.8"}
io.github.seancorfield/build-clj {:git/tag "v0.9.2", :git/sha "9c9f078"}},
:ns-default build}}}