Skip to content

Commit

Permalink
new deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
behrica committed Oct 3, 2024
1 parent d02c6a2 commit 9960cb8
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
25 changes: 21 additions & 4 deletions build.clj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
(ns build
(:refer-clojure :exclude [test])
(:require [clojure.tools.build.api :as b] ; for b/git-count-revs
[org.corfield.build :as bb]))
[org.corfield.build :as bb]
[deps-deploy.deps-deploy :as dd]))

(def lib 'org.scicloj/scicloj.ml.xgboost)
; alternatively, use MAJOR.MINOR.COMMITS:
Expand Down Expand Up @@ -61,7 +62,23 @@
(assoc :lib lib :version version)
(bb/install)))

;; (defn deploy "Deploy the JAR to Clojars." [opts]
;; (-> opts
;; (assoc :lib lib :version version)
;; (bb/deploy)))

(defn- jar-opts [opts]
(assoc opts
:lib lib :version version
:jar-file (format "target/%s-%s.jar" lib version)
:basis (b/create-basis {})
:class-dir class-dir
:target "target"
:src-dirs ["src"]
:pom-data (pom-template)))

(defn deploy "Deploy the JAR to Clojars." [opts]
(-> opts
(assoc :lib lib :version version)
(bb/deploy)))
(let [{:keys [jar-file] :as opts} (jar-opts opts)]
(dd/deploy {:installer :remote :artifact (b/resolve-path jar-file)
:pom-file (b/pom-path (select-keys opts [:lib :class-dir]))}))
opts)
6 changes: 5 additions & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@


:build {:deps {io.github.seancorfield/build-clj
{:git/tag "v0.4.0" :git/sha "54e39ae"}}
{:git/tag "v0.4.0" :git/sha "54e39ae"}
io.github.clojure/tools.build {:mvn/version "0.9.6"}
slipset/deps-deploy {:mvn/version "0.2.1"}

}
:ns-default build}

:run-tests {:main-opts ["-m" "kaocha.runner"]}
Expand Down

0 comments on commit 9960cb8

Please sign in to comment.