Skip to content

Commit

Permalink
added build/deploy code
Browse files Browse the repository at this point in the history
  • Loading branch information
simongray committed Dec 28, 2021
1 parent 9869884 commit 34e075f
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 8 deletions.
27 changes: 19 additions & 8 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
{:paths ["src"]
:deps {org.clojure/clojure {:mvn/version "1.10.1"}
aysylu/loom {:mvn/version "1.0.2"}
camel-snake-kebab {:mvn/version "0.4.2"}
edu.stanford.nlp/stanford-corenlp {:mvn/version "4.2.0"}
scicloj/metamorph.ml {:mvn/version "0.3.0-alpha3"}
techascent/tech.ml.dataset {:mvn/version "5.05"}}
:deps {org.clojure/clojure {:mvn/version "1.10.1"}
aysylu/loom {:mvn/version "1.0.2"}
camel-snake-kebab/camel-snake-kebab {:mvn/version "0.4.2"}
edu.stanford.nlp/stanford-corenlp {:mvn/version "4.3.2"}

:aliases {:dev {:extra-deps {edu.stanford.nlp/stanford-corenlp$models {:mvn/version "4.2.0"}
edu.stanford.nlp/stanford-corenlp$models-chinese {:mvn/version "4.2.0"}}
;; Below dependencies needed for the ML contributions by behrica.
scicloj/metamorph.ml {:mvn/version "0.3.0-alpha3"}
techascent/tech.ml.dataset {:mvn/version "5.05"}}

:aliases {:dev {:extra-deps {edu.stanford.nlp/stanford-corenlp$models {:mvn/version "4.3.2"}
edu.stanford.nlp/stanford-corenlp$models-chinese {:mvn/version "4.3.2"}}
:extra-paths ["dev/src"]
:jvm-opts ["-Xmx4G"]}
:test {:extra-paths ["test"]
:extra-deps {org.clojure/test.check {:mvn/version "1.1.1"}
io.github.cognitect-labs/test-runner {:git/tag "v0.5.0" :git/sha "48c3c67"}}
:exec-fn cognitect.test-runner.api/test}
:build {:extra-paths ["dev/src"]
:extra-deps {io.github.seancorfield/build-clj {:git/tag "v0.6.5"
:git/sha "972031a"}}

:ns-default build}
:rebl {:extra-deps {com.cognitect/rebl {:mvn/version "0.9.242"}
org.openjfx/javafx-fxml {:mvn/version "15-ea+6"}
org.openjfx/javafx-controls {:mvn/version "15-ea+6"}
Expand Down
36 changes: 36 additions & 0 deletions dev/src/build.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
(ns build
(:require [clojure.tools.build.api :as b]
[org.corfield.build :as bb]))

(def lib 'dk.simongray/datalinguist)
;; if you want a version of MAJOR.MINOR.COMMITS:
(def version (format "0.1.%s" (b/git-count-revs nil)))

(defn ci
"Run the CI pipeline of tests (and build the JAR)."
[opts]
(-> opts
(assoc :lib lib :version version)
(bb/run-tests)
(bb/clean)
(bb/jar)))

(defn install
"Install the JAR locally."
[opts]
(-> opts
(assoc :lib lib :version version)
(bb/install)))

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

(comment
(ci {})
(install {})
(deploy {})
#_.)

0 comments on commit 34e075f

Please sign in to comment.