-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
84 lines (66 loc) · 1.98 KB
/
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
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
76
77
78
79
80
81
82
83
84
INSTALL_DIR ?= /usr/local
PIDGTM ?= target/release/pidgtm
SMITHE ?= target/release/smithe
# CARGO
.PHONY: improve
improve:
cargo clippy --fix -p smithe_backend -p smithe_database -p smithe_lib -p startgg
cargo fmt --all
.PHONY: test
test:
cargo test --workspace -- --show-output 2>&1 | tee test.out
.PHONY: install
install:
cargo install --path .
.PHONY: build
build:
cargo build --release --all
.PHONY: build-install
build-install:
cargo build --release --all
cargo install --path .
.PHONY: cross-build-backend
cross-build-backend:
cross build --release -p smithe_backend --target aarch64-unknown-linux-gnu
.PHONY: cross-build-frontend
cross-build-frontend:
cross build --release -p smithe_frontend --target aarch64-unknown-linux-gnu
.PHONY: cross-build
cross-build:
cross build --release --target aarch64-unknown-linux-gnu
# DOCKER
.PHONY: buildx-rsbuildenvarm64
buildx-rsbuildenvarm64:
docker buildx build --platform linux/arm64 -t danstaken/rust-build-env-arm64:latest -f Dockerfile-RustBuildEnvArm64 --push .
.PHONY: buildx-pidgtm
buildx-pidgtm:
docker buildx build --platform linux/arm64 -t danstaken/pidgtm:latest -f Dockerfile-Pidgtm --push .
.PHONY: buildx-backend
buildx-backend:
docker buildx build --platform linux/arm64 -t danstaken/smithe-backend:latest -f Dockerfile-SmitheBackend --push .
.PHONY: buildx-frontend
buildx-frontend:
docker buildx build --platform linux/arm64 -t danstaken/smithe-frontend:latest -f Dockerfile-SmitheFrontend --push .
# KUBERNETES
.PHONY: deploy-frontend
deploy-frontend:
kubectl apply -f ./frontend-deployment.yml
kubectl apply -f ./frontend-service.yml
# PIDGTM
.PHONY: pidgtm
pidgtm-map:
$(PIDGTM) map
# BACKEND
.PHONY: run-backend
run-backend:
cargo run --manifest-path ./backend/Cargo.toml
# FRONTEND
.PHONY: build-frontend
build-frontend:
trunk build --release ./frontend/index.html
.PHONY: serve-frontend
serve-frontend:
trunk serve ./frontend/index.html
.PHONY: run-image-backend
run-image-backend:
node ./image-upload-backend/app.js