-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
58 lines (41 loc) · 1.41 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
56
57
58
CARGO := cargo +stable
CARGO_NIGHTLY := $(subst stable,nightly,$(CARGO))
all : build
build :
$(CARGO) check
# build some intermediate configuration to test different feature combinations
cd butane && $(CARGO) check --features pg
cd butane && $(CARGO) check --features pg,datetime
cd butane && $(CARGO) check --features sqlite
cd examples/getting_started && $(CARGO) check --features "sqlite,sqlite-bundled"
cargo build --all-features
lint :
$(CARGO) clippy --all-features -- -D warnings
lint-ci : doclint lint spellcheck check-fmt
check : build doclint lint spellcheck check-fmt test
test :
$(CARGO) test --all-features
# And run the example tests separately to avoid feature combinations
cd examples; for dir in *; do cargo +stable test -p $dir --all-features; done
clean :
$(CARGO) clean
fmt :
$(CARGO_NIGHTLY) fmt
check-fmt :
$(CARGO_NIGHTLY) fmt --check
editorconfig-checker
spellcheck :
typos
doclint :
RUSTDOCFLAGS="-D warnings" RUSTFLAGS="-A elided_named_lifetimes" $(CARGO_NIGHTLY) doc --no-deps --all-features
doc :
cd butane && $(CARGO_NIGHTLY) doc --no-deps --all-features
docview :
cd butane && $(CARGO_NIGHTLY) doc --all-features --open
install :
cd butane_cli && $(CARGO) install --path .
regenerate-example-migrations :
for dir in examples/*; do \
(cd $$dir; cargo +stable run -p butane_cli --all-features -- regenerate; \
cargo +stable run -p butane_cli --all-features -- embed); \
done