forked from thoth-pub/thoth
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
75 lines (57 loc) · 1.56 KB
/
Makefile
File metadata and controls
75 lines (57 loc) · 1.56 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
THOTH_GRAPHQL_API ?= http://localhost:8000
THOTH_EXPORT_API ?= http://localhost:8181
.PHONY: \
build-graphql-api \
build-export-api \
build-app \
run-app \
run-graphql-api \
run-export-api \
docker-dev \
docker-dev-build \
docker-dev-run \
test \
clippy \
format \
check-format \
check \
check-all \
all: build-graphql-api build-export-api build-app
check-all: test check clippy check-format
run-app: build-app
RUST_BACKTRACE=1 cargo run start app
run-graphql-api: build-graphql-api
RUST_BACKTRACE=1 cargo run init
run-export-api: build-export-api
RUST_BACKTRACE=1 cargo run start export-api
docker-dev: docker-dev-build docker-dev-run
docker-dev-build:
docker-compose -f docker-compose.dev.yml build
docker-dev-run:
docker-compose -f docker-compose.dev.yml up
cargo-build:
cargo build
build-graphql-api: cargo-build
build-export-api: cargo-build
build-app: build-wasm cargo-build
build-wasm:
THOTH_GRAPHQL_API=$(THOTH_GRAPHQL_API) \
THOTH_EXPORT_API=$(THOTH_EXPORT_API) \
wasm-pack build --debug thoth-app/ --target web && \
rollup thoth-app/main.js --format iife --file thoth-app/pkg/thoth_app.js
test:
THOTH_GRAPHQL_API=$(THOTH_GRAPHQL_API) \
THOTH_EXPORT_API=$(THOTH_EXPORT_API) \
cargo test --workspace
clippy:
THOTH_GRAPHQL_API=$(THOTH_GRAPHQL_API) \
THOTH_EXPORT_API=$(THOTH_EXPORT_API) \
cargo clippy --all --all-targets --all-features -- -D warnings
format:
cargo fmt --all --
check-format:
cargo fmt --all -- --check
check:
THOTH_GRAPHQL_API=$(THOTH_GRAPHQL_API) \
THOTH_EXPORT_API=$(THOTH_EXPORT_API) \
cargo check --workspace