-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
bb.edn
59 lines (58 loc) · 3.44 KB
/
bb.edn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{:paths ["."]
:deps {}
:min-bb-version "0.4.0"
:tasks {:requires ([clojure.string :as str])
-pom.xml
{:doc "Creates pom.xml"
:task (clojure "-Spom")}
deps-prep
{:doc "Build the required deps"
:task (clojure "-T:build prep-deps")}
-LMGREP_VERSION
{:doc "Update LMGREP_VERSION file"
:task (let [version (->> (shell {:out :string} "git describe --tags --abbrev=0")
(:out)
(str/trim))]
(spit "resources/LMGREP_VERSION" (str version "-SNAPSHOT")))}
uberjar
{:doc "Build an uberjar"
:override-builtin true
:depends [deps-prep -pom.xml -LMGREP_VERSION]
:task (clojure "-T:build uberjar")}
run
{:requires ([script.env-profiles :as e])
:override-builtin true
:doc "Run lmgrep on JVM with required profiles"
:task (let [profiles (e/profiles)]
(println "Running lmgrep on JVM with profiles: " profiles)
(apply clojure (cond-> [(str "-M:" (clojure.string/join ":" profiles) " -m lmgrep.core")]
(not (empty? *command-line-args*)) (concat *command-line-args*))))}
test
{:requires ([script.env-profiles :as e])
:doc "Run tests with the required profiles"
:task (let [profiles (e/profiles)]
(println "Running lmgrep tests with profiles: " profiles)
(clojure (str "-M:"
(clojure.string/join ":" profiles)
":test")))}
lint
{:doc "Either clj-kondo CLI or the JVM version"
:task (try
(shell "clj-kondo" "--lint" "src" "test")
(catch Exception _
(clojure "-M:clj-kondo")))}
outdated
{:doc "Checks for outdated dependencies."
:task (clojure "-Sdeps '{:deps {org.slf4j/slf4j-nop {:mvn/version \"2.0.7\"} com.github.liquidz/antq {:mvn/version \"RELEASE\"}}}' -M -m antq.core")}
generate-reflection-config
{:requires ([script.reflection :as r]
[script.env-profiles :as e])
:doc "Generate config files for GraalVM native-image"
:task (let [profiles (e/profiles)]
(println "Running the tests with a native image agent with profiles: " profiles)
(clojure {:extra-env {"LMGREP_WRITE_TEST_DATA" "true"}}
(str "-J-agentlib:native-image-agent=config-output-dir=graalvm -M:"
(clojure.string/join ":" profiles)
":test"))
(println "Filtering Lucene classes with all their constructors:")
(r/gen))}}}