-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
88 lines (65 loc) · 2.28 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
85
86
87
88
VERSION=`$(shell pwd)/target/release/colmsg -V | cut -b 8-`
CONTAINER_NAME=swagger-api-kh
ifeq ($(shell uname),Linux)
OPEN=xdg-open
else
OPEN=open
endif
release/x86_64-linux:
cargo build --release
tar -C target/release -czvf target/release/colmsg-v${VERSION}-x86_64-unknown-linux-gnu.tar.gz colmsg
release/x86_64-darwin:
make -p target/x86_64-apple-darwin/release
docker run --rm \
--volume .:/root/src \
--workdir /root/src \
joseluisq/rust-linux-darwin-builder:1.68.1 \
sh -c "cargo build --release --target x86_64-apple-darwin"
tar -C target/x86_64-apple-darwin/release -czvf target/x86_64-apple-darwin/release/colmsg-v${VERSION}-x86_64-apple-darwin.tar.gz colmsg
release/aarch64-darwin:
mkdir -p target/aarch64-apple-darwin/release
docker run --rm \
--volume .:/root/src \
--workdir /root/src \
joseluisq/rust-linux-darwin-builder:1.68.1 \
sh -c "cargo build --release --target aarch64-apple-darwin"
tar -C target/aarch64-apple-darwin/release -czvf target/aarch64-apple-darwin/release/colmsg-v${VERSION}-aarch64-apple-darwin.tar.gz colmsg
release/x86_64-win:
cargo build --release --target x86_64-pc-windows-gnu
@cd target/x86_64-pc-windows-gnu/release/ && zip colmsg-v${VERSION}-x86_64-pc-windows-gnu.zip colmsg.exe
server/kh:
docker-compose up swagger-api-kh
stop/server/kh:
docker-compose stop swagger-api-kh
restart/server/kh:
docker-compose restart swagger-api-kh
start/ui-editor/kh:
docker-compose up -d swagger-editor-kh swagger-ui-kh
stop/ui-editor/kh:
docker-compose stop swagger-editor-kh swagger-ui-kh
restart/ui-editor/kh:
docker-compose restart swagger-editor-kh swagger-ui-kh
open/editor/kh:
$(OPEN) http://localhost:8001/
open/ui/kh:
$(OPEN) http://localhost:8002/
server/n46:
docker-compose up swagger-api-n46
stop/server/n46:
docker-compose stop swagger-api-n46
restart/server/n46:
docker-compose restart swagger-api-n46
start/ui-editor/n46:
docker-compose up -d swagger-editor-n46 swagger-ui-n46
stop/ui-editor/n46:
docker-compose stop swagger-editor-n46 swagger-ui-n46
restart/ui-editor/n46:
docker-compose restart swagger-editor-n46 swagger-ui-n46
open/editor/n46:
$(OPEN) http://localhost:8004/
open/ui/n46:
$(OPEN) http://localhost:8005/
down:
docker-compose down --rmi all --volumes --remove-orphans
ssh:
docker exec -it $(CONTAINER_NAME) /bin/sh