forked from jneug/schule-typst
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
77 lines (56 loc) · 1.73 KB
/
Justfile
File metadata and controls
77 lines (56 loc) · 1.73 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
root := justfile_directory()
package-fork := x'${TYPST_PKG_FORK:-}'
export TYPST_ROOT := root
[private]
default:
@just --list --unsorted
# generate assets
assets:
typst compile docs/thumbnail.typ thumbnail-light.svg
typst compile --input theme=dark docs/thumbnail.typ thumbnail-dark.svg
# generate manual
doc: assets
typst compile docs/manual.typ docs/manual.pdf
# run test suite
test *args:
tt run {{ args }}
# update test cases
update *args:
tt update {{ args }}
# package the library into the specified destination folder
package target:
./scripts/package "{{ target }}"
# install the library with the "@local" prefix
install: (package "@local")
# install the library with the "@preview" prefix (for pre-release testing)
install-preview: (package "@preview")
# create a symbolic link to this library in the target repository
link target="@local":
./scripts/link "{{ target }}"
link-preview: (link "@preview")
# bump version number
bump VERSION:
tbump {{VERSION}}
[private]
[working-directory(x'${TYPST_PKG_FORK:-.}')]
prepare-fork:
echo "preparing package for relase in $TYPST_PKG_FORK"
git checkout main
git pull typst main
git push origin --force
# prepare: (package package-fork)
prepare: prepare-fork (package package-fork)
deploy: test doc prepare
[private]
remove target:
./scripts/uninstall "{{ target }}"
# uninstalls the library from the "@local" prefix
uninstall: (remove "@local")
# uninstalls the library from the "@preview" prefix (for pre-release testing)
uninstall-preview: (remove "@preview")
# unlinks the library from the "@local" prefix
unlink: (remove "@local")
# unlinks the library from the "@preview" prefix
unlink-preview: (remove "@preview")
# run ci suite
ci: test doc