Skip to content

Commit

Permalink
Updated makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Sep 21, 2021
1 parent b0839df commit 80bfea2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .make/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 ':#'

Expand Down
6 changes: 5 additions & 1 deletion .make/go.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 80bfea2

Please sign in to comment.