diff --git a/README.md b/README.md index 9138681..6dd5c7e 100644 --- a/README.md +++ b/README.md @@ -315,6 +315,22 @@ solutions on a database of a million triples can be done on a laptop in less than 10 seconds. Query time scaling seems to be roughly linear with the database size. +## Developing Matcha + +To test, create and build a library jar run: + +``` +$ clojure -T:build ci +``` + +Once you have done that to deploy the jar to clojars run: + +``` +$ clojure -T:build deploy +``` + +_NOTE_: For this step to work you will need appropriate deployment +privileges on clojars.org. ## License diff --git a/build.clj b/build.clj new file mode 100644 index 0000000..ca3bbf5 --- /dev/null +++ b/build.clj @@ -0,0 +1,30 @@ +(ns build + (:require [clojure.tools.build.api :as b] + [org.corfield.build :as bb])) + +(def lib 'grafter/matcha.alpha) +(def version (format "0.2.%s" (b/git-count-revs nil))) +(def jar-file (format "target/%s-%s.jar" (name lib) version)) + +(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))) diff --git a/deps.edn b/deps.edn index 59d2b26..16081a2 100644 --- a/deps.edn +++ b/deps.edn @@ -10,5 +10,11 @@ :test {:extra-paths ["test"] :extra-deps {lambdaisland/kaocha {:mvn/version "0.0-248"} - grafter/grafter {:mvn/version "2.1.16"}}}} + grafter/grafter {:mvn/version "2.1.16"}} + :main-opts ["-m" "kaocha.runner"]} + + :build {:deps {io.github.seancorfield/build-clj + {:git/tag "v0.6.3" :git/sha "9b8e09b"}} + :ns-default build} + } } diff --git a/project.clj b/project.clj deleted file mode 100644 index 20096d0..0000000 --- a/project.clj +++ /dev/null @@ -1,16 +0,0 @@ -(defproject grafter/matcha.alpha "0.1.14-SNAPSHOT" - :description "A SPARQL-like query engine and DSL for querying in - memory RDF models." - :url "https://github.com/Swirrl/matcha" - :license {:name "Eclipse Public License" - :url "http://www.eclipse.org/legal/epl-v10.html"} - :dependencies [[org.clojure/clojure "1.10.0"] - [org.clojure/core.logic "1.0.0"]] - - :profiles {:dev {:dependencies [[grafter "2.1.10"]]}} - - :deploy-repositories [["releases" :clojars] - ["snapshots" :clojars]] - ;;:plugins [[lein-tools-deps "0.4.1"]] - ;;:lein-tools-deps/config {:config-files [:install :user :project]} - )