forked from Namaneo/Junie
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (31 loc) · 1.11 KB
/
Makefile
File metadata and controls
40 lines (31 loc) · 1.11 KB
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
TARGET := junie
VERSION := 0.3.0
APP_OUT := app/build
API_OUT := api/build
UI_OUT := ui/build
OUT := bin
all: clean $(APP_OUT) $(API_OUT) $(UI_OUT)
$(APP_OUT):
( cd app && make )
$(API_OUT):
( cd api && env GOOS=linux GOARCH=amd64 go build -o build/linux/junie )
( cd api && env GOOS=darwin GOARCH=amd64 go build -o build/macos/junie )
( cd api && env GOOS=windows GOARCH=amd64 go build -o build/windows/junie.exe )
$(UI_OUT):
( cd ui && ionic build )
pack: all
rm -rf $(OUT)
mkdir $(OUT)
cp -R $(APP_OUT) $(OUT)/app
cp -R $(UI_OUT) $(OUT)/ui
cp -R assets $(OUT)/assets
( cd $(OUT) && zip -r $(TARGET)-linux-$(VERSION).zip app ui assets )
( cd $(OUT) && zip -r $(TARGET)-macos-$(VERSION).zip app ui assets )
( cd $(OUT) && zip -r $(TARGET)-windows-$(VERSION).zip app ui assets )
zip -rjv $(OUT)/$(TARGET)-linux-$(VERSION).zip $(API_OUT)/linux/junie
zip -rjv $(OUT)/$(TARGET)-macos-$(VERSION).zip $(API_OUT)/linux/junie
zip -rjv $(OUT)/$(TARGET)-windows-$(VERSION).zip $(API_OUT)/windows/junie.exe
clean:
rm -rf $(APP_OUT) $(API_OUT) $(UI_OUT)
clean-all: clean
make -C app clean-all