From 524a9e33d46f9ce5c9073e53efc9d3877109766f Mon Sep 17 00:00:00 2001 From: Will McCutchen <will@mccutch.org> Date: Wed, 30 Sep 2020 20:33:34 -0400 Subject: [PATCH] Add `make watch` command --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index cdb9979..bac4336 100644 --- a/Makefile +++ b/Makefile @@ -95,6 +95,9 @@ gcloud-auth: run: build $(DIST_PATH)/go-httpbin +watch: $(TOOL_REFLEX) + reflex -s -r '\.(go|html)$$' make run + # ============================================================================= # docker images @@ -111,13 +114,14 @@ imagepush: image # # Deps are installed outside of working dir to avoid polluting go modules # ============================================================================= -deps: $(TOOL_GOBINDATA) $(TOOL_GOLINT) $(TOOL_STATICCHECK) - $(TOOL_GOBINDATA): cd /tmp && go get -u github.com/kevinburke/go-bindata/... $(TOOL_GOLINT): cd /tmp && go get -u golang.org/x/lint/golint +$(TOOL_REFLEX): + cd /tmp && go get -u github.com/cespare/reflex + $(TOOL_STATICCHECK): cd /tmp && go get -u honnef.co/go/tools/cmd/staticcheck -- GitLab