Skip to content

Commit 944b7f7

Browse files
authoredMay 27, 2020
chore(makefile): update Makefile (robinjoseph08#10)
1 parent 18475c2 commit 944b7f7

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed
 

‎.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,4 @@ issues:
3131
- path: _test\.go
3232
linters:
3333
- dupl
34+
- scopelint

‎Makefile

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
BIN_DIR ?= ./bin
2-
DIRS ?= $(shell find . -name '*.go' | grep --invert-match 'vendor' | xargs -n 1 dirname | sort --unique)
32
GO_TOOLS := \
43
github.com/git-chglog/git-chglog/cmd/git-chglog \
54
github.com/mattn/goveralls \
@@ -23,7 +22,7 @@ clean:
2322

2423
coveralls:
2524
@echo "---> Sending coverage info to Coveralls"
26-
goveralls -coverprofile=$(COVERAGE_PROFILE) -service=travis-ci
25+
$(BIN_DIR)/goveralls -coverprofile=$(COVERAGE_PROFILE) -service=travis-ci
2726

2827
.PHONY: enforce
2928
enforce:
@@ -42,7 +41,7 @@ install:
4241
go mod download
4342

4443
.PHONY: lint
45-
lint:
44+
lint: $(BIN_DIR)/golangci-lint
4645
@echo "---> Linting"
4746
$(BIN_DIR)/golangci-lint run
4847

@@ -52,18 +51,21 @@ release:
5251
ifndef tag
5352
$(error tag must be specified)
5453
endif
55-
git-chglog --output CHANGELOG.md --next-tag $(tag)
54+
$(BIN_DIR)/git-chglog --output CHANGELOG.md --next-tag $(tag)
5655
sed -i "" "s/version-.*-green/version-$(tag)-green/" README.md
5756
git add CHANGELOG.md README.md
5857
git commit -m $(tag)
5958
git tag $(tag)
6059
git push origin master --tags
6160

6261
.PHONY: setup
63-
setup: install
62+
setup: $(BIN_DIR)/golangci-lint
6463
@echo "--> Setting up"
65-
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(BIN_DIR) v1.16.0
66-
go get $(GO_TOOLS) && GOBIN=$$(realpath $(BIN_DIR)) go install $(GO_TOOLS)
64+
GOBIN=$(PWD)/$(subst ./,,$(BIN_DIR)) go install $(GO_TOOLS)
65+
66+
$(BIN_DIR)/golangci-lint:
67+
@echo "--> Installing linter"
68+
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(BIN_DIR) v1.27.0
6769

6870
.PHONY: test
6971
test:

0 commit comments

Comments
 (0)
Please sign in to comment.