-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathMakefile
60 lines (42 loc) · 1.48 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
# Makefile
.PHONY: setup member_format member_clippy docker-build docker-up docker-down docker-push start start-dev build-dev access access-admin release-odin release-http-server release test docker-dev
setup:
@if [ ! -f "$$PWD/docker-compose.dev.yml" ]; then \
echo "Creating docker-compose.dev.yml for development"; \
cp "$$PWD/docker-compose.yml" "$$PWD/docker-compose.dev.yml"; \
fi
mkdir -p ./tmp/{saves,backups,server}
lint: member_format
docker run --rm -v "$$PWD:/app" -w /app node:lts sh -c 'npx -y prettier --write .'
test:
cargo test
member_format:
cargo fmt
member_clippy:
cargo clippy
docker-build: setup
docker compose -f ./docker-compose.dev.yml build
docker-up: setup
docker compose -f ./docker-compose.dev.yml up
docker-down: setup
docker compose -f ./docker-compose.dev.yml down
docker-push: setup
docker compose -f ./docker-compose.dev.yml push
docker-dev: setup
docker compose -f ./docker-compose.dev.yml up --build
start: member_format member_clippy docker-up
start-dev: member_format member_clippy docker-down docker-build docker-up
build-dev: member_format member_clippy docker-build
access:
docker-compose -f ./docker-compose.dev.yml exec --user steam valheim bash
access-admin:
docker-compose -f ./docker-compose.dev.yml exec valheim bash
release-odin:
ifeq ($(PROFILE),production)
cargo build --release --bin odin
endif
release-http-server:
ifeq ($(PROFILE),production)
cargo build --release --bin huginn
endif
release: release-odin release-http-server