-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathjustfile
More file actions
111 lines (88 loc) · 2.64 KB
/
Copy pathjustfile
File metadata and controls
111 lines (88 loc) · 2.64 KB
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
102
103
104
105
106
107
108
109
110
111
default:
@just --list
today := `date +%F`
current_version := `cat resources/LAZYTEST_VERSION | xargs`
project := 'io.github.noahtheduke/lazytest'
# Set version, change all instances of <<next>> to version
@set-version version:
echo '{{version}}' > resources/LAZYTEST_VERSION
fd '.(clj|edn|md)' . -x sd '<<next>>' '{{version}}' {}
sd '{{current_version}}' '{{version}}' README.md
sd '{{current_version}}' '{{version}}' build.clj
sd '## Unreleased' '## Unreleased\n\n## {{version}}\n\nReleased `{{today}}`.' CHANGELOG.md
version:
@echo '{{current_version}}'
@gen-docs:
markdown-toc -i --maxdepth 2 README.md
clojure-lsp:
clojure-lsp diagnostics
splint:
clojure -M:provided:dev:test:splint
prep:
clojure -X:deps prep
clojure -T:build compile-java
clean:
clojure -T:build clean
compile:
clojure -T:build compile-clojure :clean true
jar:
clojure -T:build jar
uberjar:
clojure -T:build uberjar
alias uber := uberjar
lint:
@just clojure-lsp
@just splint
test-bb *args:
@just prep
bb lazytest {{args}}
[no-exit-message]
test-raw *args:
clojure -M:provided:dev:test:run {{args}}
alias run := test-raw
[no-exit-message]
test *args:
@just prep
@just test-raw {{args}}
test-all-args := "--doctests --md README.md --dir docs --dir test --output results --output summary"
[no-exit-message]
test-all *args:
@just clojure-lsp
@just splint
@just compile
@just prep
bb lazytest {{test-all-args}} {{args}}
clojure -M:v1.10:provided:dev:test:run {{test-all-args}} {{args}}
clojure -M:v1.11:provided:dev:test:run {{test-all-args}} {{args}}
clojure -M:v1.12:provided:dev:test:run {{test-all-args}} {{args}}
repl arg="":
@just prep
clojure -M:provided:dev:test{{arg}}:profile:repl
@clojars:
env CLOJARS_USERNAME='noahtheduke' CLOJARS_PASSWORD=`cat ../clojars.txt` clojure -T:build deploy
inform-cljdoc version=current_version:
curl -X POST \
-d project={{project}} \
-d version={{version}} \
https://cljdoc.org/api/request-build2
# Builds the uberjar, builds the jar, sends the jar to clojars
@release version:
git switch main
echo 'Running tests'
just test-all
echo 'Setting new version {{version}}'
just set-version {{version}}
echo 'Commit and tag'
just gen-docs
git commit -a -m 'Bump version for release'
git tag v{{version}}
echo 'Pushing to github'
git push
git push --tags
echo 'Building uber'
@just uberjar
echo 'Deploying to clojars'
just clojars
echo 'Informing cljdoc'
just inform-cljdoc {{version}}
echo "Don't forget to cut a release on Github!"