-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
23 lines (17 loc) · 673 Bytes
/
Copy pathMakefile
File metadata and controls
23 lines (17 loc) · 673 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
WEB_DIR := apps/web
BACKEND_DIR := apps/backend
WEB_DIST := $(WEB_DIR)/dist
BACKEND_STATIC_DIST := $(BACKEND_DIR)/servers/echo/staticweb/dist
.PHONY: web-install web-build web-copy-assets single-binary docker-release
web-install:
cd $(WEB_DIR) && npm install
web-build:
cd $(WEB_DIR) && npm run build
web-copy-assets: web-build
mkdir -p $(BACKEND_STATIC_DIST)
find $(BACKEND_STATIC_DIST) -mindepth 1 -maxdepth 1 ! -name placeholder.txt -exec rm -rf {} +
cp -R $(WEB_DIST)/. $(BACKEND_STATIC_DIST)/
single-binary: web-copy-assets
cd $(BACKEND_DIR) && GO111MODULE=on CGO_ENABLED=1 go build -o datalk-api ./cmd/api
docker-release:
docker build -t datalk:latest .