-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
60 lines (51 loc) · 1.54 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
test_gamelib:
cd ./gamelib && cargo test && cd -
compile_gamelib_to_wasm:
cd ./wasm &&\
wasm-pack build --target web || true &&\
rm -r ../frontend/src/pkg || true &&\
mv pkg ../frontend/src &&\
cd -
pnpm_i:
cd ./frontend && pnpm i || true && cd -
run_dev:
cd ./frontend && pnpm run dev || true && cd -
front_build:
cd ./frontend && pnpm run build || true && cd -
test_server:
rm .env Dockerfile docker-compose.yml || true &&\
cp ./deploy/test/* . &&\
cp ./deploy/test/.env . &&\
docker compose down &&\
docker compose build &&\
docker compose run server
run_prod:
rm .env Dockerfile docker-compose.yml || true &&\
cp ./deploy/prod/* . &&\
cp ./deploy/prod/.env . &&\
mkdir -p ./volumes/postgres_data &&\
docker compose down --remove-orphans &&\
docker compose up -d --build --force-recreate
run_server:
rm .env Dockerfile docker-compose.yml || true &&\
cp ./deploy/dev/* . &&\
cp ./deploy/dev/.env . &&\
mkdir -p ./volumes/postgres_data &&\
docker compose down --remove-orphans &&\
docker compose up -d --build --force-recreate
deploy_front:
git branch -D gh-pages || true &&\
git checkout -b gh-pages &&\
make compile_gamelib_to_wasm &&\
make pnpm_i &&\
make front_build &&\
mv ./frontend/dist/* ./ &&\
mv ./frontend/404.html ./ &&\
rm -rf ./frontend &&\
find . -not \( -wholename './.git/*' -or -name 'index.html' -or -wholename './assets/*' -or -name '404.html' \) -delete || true &&\
git add --all &&\
git commit -m "lol" &&\
git push -f -u origin gh-pages &&\
git checkout - &&\
make pnpm_i &&\
make compile_gamelib_to_wasm