From af11a176f17762315bbad67faee57042cd4b911e Mon Sep 17 00:00:00 2001 From: Kailash Nadh Date: Sun, 25 Jul 2021 15:47:37 +0530 Subject: [PATCH] Refactor make run to always compile and use the correct frontend path --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b37a3088..0434c891 100644 --- a/Makefile +++ b/Makefile @@ -36,10 +36,10 @@ $(FRONTEND_YARN_MODULES): frontend/package.json frontend/yarn.lock $(BIN): $(shell find . -type f -name "*.go") CGO_ENABLED=0 go build -o ${BIN} -ldflags="-s -w -X 'main.buildString=${BUILDSTR}' -X 'main.versionString=${VERSION}'" cmd/*.go -# Run the backend. +# Run the backend in dev mode. The frontend assets in dev mode are loaded from disk from frontend/dist/frontend. .PHONY: run -run: $(BIN) - ./${BIN} +run: + CGO_ENABLED=0 go run -ldflags="-s -w -X 'main.buildString=${BUILDSTR}' -X 'main.versionString=${VERSION}' -X 'main.frontendDir=frontend/dist/frontend'" cmd/*.go # Build the JS frontend into frontend/dist. $(FRONTEND_DIST): $(FRONTEND_DEPS)