From a89be187b2a57d6b35fd22828f6118a4fc6f701f Mon Sep 17 00:00:00 2001 From: konrad Date: Sat, 27 Apr 2019 11:05:33 +0200 Subject: [PATCH] Fixed make fmt-check --- .drone.yml | 4 +--- Makefile | 7 ++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.drone.yml b/.drone.yml index fdbb20c..4e64fd2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -85,10 +85,8 @@ workspace: path: src/git.kolaente.de/sofaraum/client trigger: - branch: - - master event: - - push + - tag steps: # Needed to get the versions right as they depend on tags diff --git a/Makefile b/Makefile index c0807a0..9b904bb 100644 --- a/Makefile +++ b/Makefile @@ -59,9 +59,6 @@ test: go test -cover -coverprofile cover.out $(PACKAGES) go tool cover -html=cover.out -o cover.html -required-gofmt-version: - @go version | grep -q '\(1.7\|1.8\|1.9\|1.10\|1.11\)' || { echo "We require go version 1.7, 1.8, 1.9, 1.10 or 1.11 to format code" >&2 && exit 1; } - .PHONY: lint lint: @hash golint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ @@ -70,11 +67,11 @@ lint: for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || exit 1; done; .PHONY: fmt -fmt: required-gofmt-version +fmt: $(GOFMT) -w $(GOFILES) .PHONY: fmt-check -fmt-check: required-gofmt-version +fmt-check: # get all go files and run go fmt on them @diff=$$($(GOFMT) -d $(GOFILES)); \ if [ -n "$$diff" ]; then \