-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (56 loc) · 1.66 KB
/
Makefile
File metadata and controls
73 lines (56 loc) · 1.66 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
.DEFAULT_GOAL := release
RUST_LOG ?= debug
# -----------------------------------------------------------------------------
# Real targets
# -----------------------------------------------------------------------------
node_modules: package-lock.json
npm install --from-lockfile
touch node_modules
package-lock.json: package.json
npm install --package-lock-only
public: node_modules
./jarmuz-generate.mjs
target/debug/poet: target/debug/poet
cargo build
test_site-x86_64.AppImage: test_site.AppDir test_site.AppDir/poet
ARCH=x86_64 appimage-run ~/bin/appimagetool-x86_64.AppImage ./test_site.AppDir
test_site.AppDir:
cargo run make app-dir . \
--name test_site \
--output-directory . \
--title "Test Site" \
--version "1.2.3"
test_site.AppDir/poet: target/debug/poet test_site.AppDir
cp target/debug/poet test_site.AppDir/poet
# -----------------------------------------------------------------------------
# Phony targets
# -----------------------------------------------------------------------------
.PHONY: clean
clean:
rm -rf node_modules
rm -rf target
.PHONY: clippy
clippy:
cargo clippy --workspace --all-targets -- -D warnings
.PHONY: coverage
coverage: node_modules
cargo llvm-cov clean --workspace
cargo llvm-cov --workspace --no-report
cargo llvm-cov report --json --output-path target/llvm-cov.json
cargo llvm-cov report
npx rust-coverage-check target/llvm-cov.json \
--workspace-root $(CURDIR) \
--gated rhai_components \
--required-percent 100
.PHONY: fmt
fmt: node_modules
./jarmuz-fmt.mjs
.PHONY: release
release:
cargo build --release
.PHONY: test
test:
cargo test --workspace
.PHONY: watch
watch: node_modules
./jarmuz-watch.mjs