Refactor make run to always compile and use the correct frontend path
This commit is contained in:
parent
6a87f388ee
commit
af11a176f1
1 changed files with 3 additions and 3 deletions
6
Makefile
6
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)
|
||||
|
|
Loading…
Reference in a new issue