-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (27 loc) 路 849 Bytes
/
Copy pathMakefile
File metadata and controls
37 lines (27 loc) 路 849 Bytes
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
.PHONY: prepare check test watch build update docker-build backup
prepare:
cargo fmt
cargo clippy --fix --locked --allow-dirty -- -D warnings
cargo check --release --locked
check:
cargo fmt --check
cargo clippy --locked -- -D warnings
cargo check --release --locked
test:
cargo test --locked
watch:
watchexec --restart --watch src --watch assets --exts rs,css,js,svg -- cargo run --locked
build:
cargo build --release --locked
ls -lh target/release/$(shell basename $(CURDIR))
update:
cargo upgrade -i
docker-build:
docker build -t ghstats:latest .
docker images -q ghstats:latest | xargs docker inspect -f '{{.Size}}' | xargs numfmt --to=iec
# --- Deploy ---
HOST=srv
backup:
mkdir -p data
scp $(HOST):/root/data/ghstats.db data/backup-$(shell date -u +"%Y%m%d_%H%M").db
cp $$(ls -1t data/*.db | head -n 1) data/backup.db