-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
46 lines (37 loc) · 1.41 KB
/
justfile
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
_default:
@just --list --unsorted
_check-app app:
@if ! [ -x "$(command -v {{app}})" ]; then \
echo "\033[1;31m{{app}} is not installed ✘!\033[0m"; \
exit 1; \
fi
install-cargo-tooling:
# Installing (or if installed updating) cargo tooling
@just _check-app cargo
@cargo install cargo-watch cargo-audit cargo-llvm-cov cargo-edit sqlx-cli cocogitto
add-git-hook:
# Adding Cocogitto hook to local repository
@just _check-app cog
@cog install-hook pre-push
docker-up-all:
# Starting client and dependencies in docker-compose
@just _check-app docker-compose
@docker-compose up -d --build
docker-up-server:
# Starting server and dependencies in docker-compose
@just _check-app docker-compose
@docker-compose up server -d --build
docker-up-dev:
# Starting development services (database)
@just _check-app docker-compose
@docker-compose up database -d --build
docker-down:
# Stopping docker-compose environment
@just _check-app docker-compose
@docker-compose down
lint-server-seriously:
# Scanning server files with pedantic and nursery clippy rules
@cd server && cargo clippy -- -W clippy::pedantic -W clippy::nursery -W clippy::unwrap_used -A clippy::missing_errors_doc -A clippy::missing_const_for_fn -A clippy::must_use_candidate
prepare-offline-sqlx:
# Preparing sqlx for offline compilation
@cd server && cargo sqlx prepare