✏️ Fix Makefile so it doesn't re-run test and fmt when it doesn't need to

This commit is contained in:
Dan Jones 2024-10-09 15:13:34 -05:00
commit 85671a076c

View file

@ -23,7 +23,8 @@ test: ## Test application and generate coverage report
$(MAKE) clean $(MAKE) clean
$(MAKE) $(COVEROUT) $(MAKE) $(COVEROUT)
$(COVEROUT): $(SOURCES) fmt $(COVEROUT): $(SOURCES)
$(MAKE) fmt
go test ./... -race -cover -coverprofile $@ go test ./... -race -cover -coverprofile $@
$(COVERHTML): $(COVEROUT) $(COVERHTML): $(COVEROUT)
@ -33,7 +34,7 @@ $(COVERHTML): $(COVEROUT)
report: $(COVERHTML) ## Generate a coverage report report: $(COVERHTML) ## Generate a coverage report
.PHONY: open-report .PHONY: open-report
open-report: report ## Open the coverage report in the default browser open-report: $(COVERHTML) ## Open the coverage report in the default browser
xdg-open $(COVERHTML) xdg-open $(COVERHTML)
.PHONY: build .PHONY: build