From 80bfea256ee9951b7c18c04982c1f3f17c1ba0c5 Mon Sep 17 00:00:00 2001 From: mrz1836 Date: Tue, 21 Sep 2021 12:28:01 -0400 Subject: [PATCH] Updated makefiles --- .make/common.mk | 7 +++++++ .make/go.mk | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.make/common.mk b/.make/common.mk index 9b24ae7..f99f95c 100644 --- a/.make/common.mk +++ b/.make/common.mk @@ -31,6 +31,13 @@ ifndef DISTRIBUTIONS_DIR endif export DISTRIBUTIONS_DIR +.PHONY: diff + +diff: ## Show the git diff + $(call print-target) + git diff --exit-code + RES=$$(git status --porcelain) ; if [ -n "$$RES" ]; then echo $$RES && exit 1 ; fi + help: ## Show this help message @egrep -h '^(.+)\:\ ##\ (.+)' ${MAKEFILE_LIST} | column -t -c 2 -s ':#' diff --git a/.make/go.mk b/.make/go.mk index 34430b3..739c2e3 100644 --- a/.make/go.mk +++ b/.make/go.mk @@ -55,7 +55,7 @@ lint: ## Run the golangci-lint application (install if not found) @echo "running golangci-lint..." @golangci-lint run --verbose -test: ## Runs vet, lint and ALL tests +test: ## Runs lint and ALL tests @$(MAKE) lint @echo "running tests..." @go test ./... -v @@ -83,6 +83,10 @@ test-ci-short: ## Runs unit tests via CI (exports coverage) @echo "running tests (CI - unit tests only)..." @go test ./... -test.short -race -coverprofile=coverage.txt -covermode=atomic +test-no-lint: ## Runs just tests + @echo "running tests..." + @go test ./... -v + uninstall: ## Uninstall the application (and remove files) @test $(BINARY_NAME) @test $(GIT_DOMAIN)