Skip to content

Commit

Permalink
Refactor make run to always compile and use the correct frontend path
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Jul 25, 2021
1 parent 6a87f38 commit af11a17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit af11a17

Please sign in to comment.