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)