-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathjustfile
101 lines (81 loc) · 2.67 KB
/
justfile
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
default:
@just --list
flow-storm:
clojure -Sforce -Sdeps '{:deps {com.github.jpmonettas/flow-storm-dbg {:mvn/version "RELEASE"}}}' -X flow-storm.debugger.main/start-debugger :port 31401 :debugger-host '"host.docker.internal"' :styles '"/home/noah/.config/flow-storm/big-fonts.css"'
clean:
rm -rf classes
mkdir classes
compile: clean
clojure -M -e "(compile 'noahtheduke.splint)"
repl arg="":
clojure -M:dev:test{{arg}}:repl
dev-run *args:
clojure -M:dev:test:run {{args}}
run *args:
clojure -M:run {{args}}
format *args="check":
clojure -M:cljfmt {{args}}
clj-kondo:
clj-kondo --parallel --lint dev src test
clojure-lsp:
clojure-lsp diagnostics
[no-exit-message]
@test-raw *args:
clojure -M:dev:test:runner --md README.md {{args}}
[no-exit-message]
test *args="--output dots":
just test-raw -e :integration {{args}}
[no-exit-message]
test-all *args="--output dots":
just clojure-lsp
bb run splint
just test-raw {{args}}
@new-rule arg:
clojure -M:new-rule -n {{arg}}
@gen-docs:
clojure -M:gen-docs
bb scripts/gen_toc.clj
today := `date +%F`
current_version := `cat resources/SPLINT_VERSION | xargs`
# Set version, change all instances of <<next>> to version
@set-version version:
echo '{{version}}' > resources/SPLINT_VERSION
fd '.(clj|edn|md)' . -x sd '<<next>>' '{{version}}' {}
sd '{{current_version}}' '{{version}}' README.md
sd '{{current_version}}' '{{version}}' docs/installation.md
sd '{{current_version}}' '{{version}}' docs/usage.md
sd '## Unreleased' '## Unreleased\n\n## {{version}} - {{today}}' CHANGELOG.md
@clojars:
env CLOJARS_USERNAME='noahtheduke' CLOJARS_PASSWORD=`cat ../clojars.txt` clojure -T:build deploy
# Builds the uberjar, builds the jar, sends the jar to clojars
@release version:
echo 'Running tests'
just test-all
echo 'Setting new version {{version}}'
just set-version {{version}}
echo 'Rendering docs'
just gen-docs
echo 'Commit and tag'
git commit -a -m 'Bump version for release'
git tag v{{version}}
echo 'Pushing to github'
git push
git push --tags
echo 'Building uber'
clojure -T:build uber
echo 'Deploying to clojars'
just clojars
install:
clojure -T:build jar
clojure -T:build install
cljdoc:
docker run --rm \
--volume $(pwd):{{invocation_directory_native()}} \
--volume "$HOME/.m2:/root/.m2" \
--volume /tmp/cljdoc:/app/data \
--entrypoint clojure \
cljdoc/cljdoc -Sforce -M:cli ingest \
--project io.github.noahtheduke/splint \
--version {{current_version}} \
--git {{invocation_directory_native()}} \
--rev $(git rev-parse HEAD)