forked from Versent/kinesis-tail
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
46 lines (37 loc) · 1.1 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
SOURCE_FILES?=$$(go list ./... | grep -v /vendor/)
TEST_PATTERN?=.
TEST_OPTIONS?=
GOLANGCI_VERSION = 1.24.0
GO ?= go
bin/golangci-lint: bin/golangci-lint-${GOLANGCI_VERSION}
@ln -sf golangci-lint-${GOLANGCI_VERSION} bin/golangci-lint
bin/golangci-lint-${GOLANGCI_VERSION}:
@curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | BINARY=golangci-lint bash -s -- v${GOLANGCI_VERSION}
@mv bin/golangci-lint $@
# Install from source.
install:
@echo "==> Installing up ${GOPATH}/bin/kinesis-tail"
@$(GO) install ./...
.PHONY: install
# Run all the tests
test:
@echo "==> Testing"
@go test -v -covermode=count -coverprofile=coverage.txt ./pkg/... ./cmd/...
.PHONY: test
# Run all the linters
lint: bin/golangci-lint
@echo "==> Linting"
@bin/golangci-lint run
.PHONY: lint
# Run all the tests and code checks
ci: test lint
.PHONY: ci
# Release binaries to GitHub.
release:
@echo "==> Releasing"
@goreleaser -p 1 --rm-dist -config .goreleaser.yml
@echo "==> Complete"
.PHONY: release
generate-mocks:
mockery -dir ../../aws/aws-sdk-go/service/lambda/lambdaiface --all
.PHONY: generate-mocks