Skip to content
Snippets Groups Projects
Unverified Commit ca20ebb3 authored by CTFang@WireLab's avatar CTFang@WireLab
Browse files

feat: add Makefile

parent ed393973
No related branches found
No related tags found
No related merge requests found
Makefile 0 → 100644
GO_BIN_PATH = bin
WEBCONSOLE = webconsole
WEBCONSOLE_GO_FILES = $(shell find -name "*.go" ! -name "*_test.go")
WEBCONSOLE_JS_FILES = $(shell find ./frontend -name '*.tsx' ! -path "*/node_modules/*")
WEBCONSOLE_FRONTEND = ./public
debug: GCFLAGS += -N -l
$(WEBCONSOLE): $(GO_BIN_PATH)/$(WEBCONSOLE) $(WEBCONSOLE_FRONTEND)
$(GO_BIN_PATH)/$(WEBCONSOLE): server.go $(WEBCONSOLE_GO_FILES)
@echo "Start building $(@F)...."
CGO_ENABLED=0 go build -ldflags "$(WEBCONSOLE_LDFLAGS)" -o $@ ./server.go
$(WEBCONSOLE_FRONTEND): $(WEBCONSOLE_JS_FILES)
@echo "Start building $(@F) frontend...."
cd frontend && \
sudo corepack enable && \
yarn install && \
yarn build && \
rm -rf ../public && \
cp -R build ../public
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment