Skip to content

Commit

Permalink
Merge pull request #29 from Swirrl/tools.build
Browse files Browse the repository at this point in the history
Migrate from leiningen to tools.build
  • Loading branch information
RickMoynihan authored Dec 21, 2021
2 parents f6ef749 + 60b3084 commit 1a14785
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 17 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
30 changes: 30 additions & 0 deletions build.clj
Original file line number Diff line number Diff line change
@@ -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)))
8 changes: 7 additions & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
}
16 changes: 0 additions & 16 deletions project.clj

This file was deleted.

0 comments on commit 1a14785

Please sign in to comment.