-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
55 lines (39 loc) · 1.05 KB
/
Makefile
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
.PHONY: all build clean check-lint lint doc utop dev-deps deps init-database test
SHELL := /bin/bash
all: build
# Compiles the libraries and binaries needed to start the server.
build:
dune build
# Run tests
test: test-unit test-integration
test-unit:
dune runtest test/unit --no-buffer -j 1
test-integration:
source .test_env && dune runtest test/integration --no-buffer -j 1
# Cleans up compilation artefacts
clean:
dune clean
# Checks that the code is properly formatted
check-lint:
dune build @fmt
# Apply the formatter to the code
lint:
dune build @fmt --auto-promote
# Builds documentation
doc:
dune build @doc
# Run a REPL (UTop) with the dependencies and libraries accessible
# in the scope
utop:
dune utop
# Retreive dependencies
deps:
opam install . --locked --deps-only --with-doc --with-test -y
# Retrieves development dependencies
dev-deps:
opam install dune merlin ocamlformat ocp-indent utop -y
# Initialize a databases
init-database:
createuser -sPE muhokama
createdb -O muhokama muhokama_dev
createdb -O muhokama muhokama_test