-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
70 lines (56 loc) · 1.28 KB
/
Copy pathJustfile
File metadata and controls
70 lines (56 loc) · 1.28 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
# SPDX-FileCopyrightText: 2024 Richard Mortier <mort@cantab.net>
#
# SPDX-License-Identifier: ISC
_default:
@just --list
PWD := env("PWD")
DOCDIR := "_build/default/_doc/_html"
BUILDDIR := "_build/install/default/bin"
TARGET := "ocal"
# build targets
build:
dune build @all
# cleanup
clean:
dune clean
# install targets
install: build
dune build @install
ln -sf {{PWD}}/{{BUILDDIR}}/{{TARGET}} ~/.local/bin/
# uninstall targets
uninstall:
dune uninstall
# run any tests
test:
dune runtest
# format sources
format:
dune fmt
# lint everything
lint:
dune build @lint
dune-release lint
# build docs
doc:
dune build @doc
dune build @doc-private
# open the docs for reading
read: doc
handlr open {{DOCDIR}}/index.html || open {{DOCDIR}}
# tag and create a release
release:
dune-release tag
dune-release -vv
# install dependencies
depends:
opam install --yes dune-release odoc
opam install --yes . --deps-only --no-depexts
# sigh. opam vs dune. sigh.
dune describe external-lib-deps | rg 'required\)' \
| tr -d "(" | tr -s " " | cut -d" " -f 2 | while read pkg; do \
echo "=== installing $pkg" ; \
opam install --yes --best-effort $pkg ; \
done
# upgrade and update OPAM
update:
opam update --upgrade --yes