From 0fb2871ba1923f86e1490da66627a60a57fabb6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Sat, 10 Apr 2021 12:03:13 +0200 Subject: [PATCH] Update Makefile --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 27187cc..3131763 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ BUILD_DIR = build/binary/current BUILD_OUTPUT = $(BUILD_DIR)/$(NAME)-$(VERSION)-$(OS)-$(ARCH) BUILD_FLAGS = -tags embed -ldflags "-X github.uio.no/torjus/apiary.Build=$(GIT_COMMIT)" -o $(BUILD_OUTPUT) -GEODB_URL = https://github.com/geoacumen/geoacumen-country/raw/master/Geoacumen-Country.mmdb +GEODB_URL = https://raw.githubusercontent.com/geoacumen/geoacumen-country/master/Geoacumen-Country.mmdb GEODB_PATH = honeypot/Geoacumen-Country.mmdb FRONTEND_BUILD_DIR = web/frontend/dist @@ -33,7 +33,10 @@ $(GEODB_PATH): $(BUILD_DIR): mkdir -p $(BUILD_DIR) -$(BUILD_OUTPUT): $(BUILD_DIR) $(GEODB_PATH) +$(FRONTEND_BUILD_DIR): + cd web/frontend && yarn install && yarn build + +$(BUILD_OUTPUT): $(BUILD_DIR) $(GEODB_PATH) $(FRONTEND_BUILD_DIR) CGO_ENABLED=0 go build $(BUILD_FLAGS) cmd/apiary.go frontend: @@ -45,7 +48,7 @@ clean: geodb: $(GEODB_PATH) -build: $(BUILD_OUTPUT) frontend +build: $(BUILD_OUTPUT) install: build mkdir -p $(INSTALL_BIN_DIR)