diff options
author | Tim <contact@bytim.eu> | 2025-05-05 21:32:52 +0200 |
---|---|---|
committer | Tim <contact@bytim.eu> | 2025-05-05 21:32:52 +0200 |
commit | 79e32a55801fc53c8d60843c6676ca05cc899299 (patch) | |
tree | cf798506172445d8f7af24eee27fd2e84f2fce81 /build.clj | |
download | chef-79e32a55801fc53c8d60843c6676ca05cc899299.tar.xz chef-79e32a55801fc53c8d60843c6676ca05cc899299.zip |
Initial commit
Diffstat (limited to 'build.clj')
-rw-r--r-- | build.clj | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/build.clj b/build.clj new file mode 100644 index 0000000..bac2b93 --- /dev/null +++ b/build.clj @@ -0,0 +1,29 @@ +(ns build + (:require [clojure.tools.build.api :as b] + [clojure.edn :as edn])) + +(def project (-> (edn/read-string (slurp "deps.edn")) + :aliases :neil :project)) +(def lib (:name project)) + +;; use neil project set version 1.2.0 to update the version in deps.edn + +(def version (:version project)) +(def class-dir "target/classes") +(def basis (b/create-basis {:project "deps.edn"})) +(def uber-file (format "target/%s-%s-standalone.jar" (name lib) version)) + +(defn clean [_] + (b/delete {:path "target"})) + +(defn uber [_] + (clean nil) + (b/copy-dir {:src-dirs ["src" "resources"] + :target-dir class-dir}) + (b/compile-clj {:basis basis + :src-dirs ["src"] + :class-dir class-dir}) + (b/uber {:class-dir class-dir + :uber-file uber-file + :basis basis + :main 'chef.core})) |