Skip to content

Commit

Permalink
tweak makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Evseev committed Sep 21, 2021
1 parent 2fbead3 commit 9bac43b
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,17 @@ generate:
./bin:
mkdir ./bin

./bin/golangci-lint: ./bin
go get github.com/golangci/golangci-lint/cmd/golangci-lint

./bin/goreleaser:
go install github.com/goreleaser/goreleaser

lint: ./bin/golangci-lint
lint: install-tools
./bin/golangci-lint run --enable=goimports --disable=unused --exclude=S1023,"Error return value" ./tests/...

install:
go mod download
go install ./cmd/minimock

# iterate over requirements from tools/tools.go and install them to ./bin
install-tools: ./bin
@cd tools && go list -f '{{range .Imports}}{{.}} {{end}}' tools.go | xargs go install

clean:
[ -e ./tests/formatter_mock.go.test_origin ] && mv -f ./tests/formatter_mock.go.test_origin ./tests/formatter_mock.go
[ -e ./tests/tester_mock_test.go.test_origin ] && mv -f ./tests/tester_mock_test.go.test_origin ./tests/tester_mock_test.go
Expand All @@ -42,8 +40,8 @@ test: test_save_origin generate
diff ./tests/tester_mock_test.go ./tests/tester_mock_test.go.test_origin
go test -race ./...

release: ./bin/goreleaser
goreleaser release
release: install-tools
./bin/goreleaser release

build: ./bin/goreleaser
goreleaser build --snapshot --rm-dist
build: install-tools
./bin/goreleaser build --snapshot --rm-dist

0 comments on commit 9bac43b

Please sign in to comment.