-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
39 lines (32 loc) · 891 Bytes
/
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
# Targets that are not associated with files
.PHONY: clean test
# Clean up backend artifacts and databases
clean:
@echo "Cleaning backend..."
cd backend && cargo sqlx database drop
cd backend && cargo sqlx database create
cd backend && cargo sqlx migrate run
@echo "Backend cleaned and databases reset"
# Run tests for backend and web
test: backend-test web-test
# Run backend tests
backend-test:
@echo "Running backend tests..."
cd backend && cargo test
# Run web tests
web-test:
@echo "Running web tests..."
cd web && pnpm run tests
# Build backend
backend-build:
@echo "Building backend"
cd backend && cargo build --release
@echo "Finished building backend"
# Build website
frontend-build:
@echo "Building frontend"
cd web && pnpm install
cd web && pnpm run build
@echo "Finished building backend"
# Build both front and backend
build: backend-build frontend-build