From 579e061de146312a8804ecccfcb2f322c2077265 Mon Sep 17 00:00:00 2001 From: Will McCutchen <will@mccutch.org> Date: Fri, 11 Nov 2022 00:27:02 -0500 Subject: [PATCH] Stop being clever about when to rebuild (#95) --- Makefile | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index b577d44..0365f69 100644 --- a/Makefile +++ b/Makefile @@ -16,22 +16,18 @@ TOOL_BIN_DIR ?= $(shell go env GOPATH)/bin TOOL_GOLINT := $(TOOL_BIN_DIR)/golint TOOL_STATICCHECK := $(TOOL_BIN_DIR)/staticcheck -GO_SOURCES = $(shell find . -name *.go) - # ============================================================================= # build # ============================================================================= -build: $(DIST_PATH)/go-httpbin - -buildtests: $(DIST_PATH)/go-httpbin.test - -$(DIST_PATH)/go-httpbin: $(GO_SOURCES) +build: mkdir -p $(DIST_PATH) CGO_ENABLED=0 go build -ldflags="-s -w" -o $(DIST_PATH)/go-httpbin ./cmd/go-httpbin +.PHONY: build -$(DIST_PATH)/go-httpbin.test: $(GO_SOURCES) +buildtests: CGO_ENABLED=0 go test -ldflags="-s -w" -v -c -o $(DIST_PATH)/go-httpbin.test ./httpbin +.PHONY: buildtests clean: rm -rf $(DIST_PATH) $(COVERAGE_PATH) -- GitLab