-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
44 lines (36 loc) · 1.07 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
SOURCE_FILES?=$$(go list ./... | grep -v /vendor/)
TEST_PATTERN?=.
TEST_OPTIONS?=
GO ?= go
# Install all the build and lint dependencies
setup:
go get -u github.com/alecthomas/gometalinter
go get -u github.com/golang/dep/cmd/dep
go get -u github.com/pierrre/gotestcover
go get -u golang.org/x/tools/cmd/cover
go get github.com/vektra/mockery/...
gometalinter --install
.PHONY: setup
# Install from source.
install:
@echo "==> Installing up ${GOPATH}/bin/versent-bless"
@$(GO) install ./...
.PHONY: install
# Run all the tests
test:
@gotestcover $(TEST_OPTIONS) -covermode=atomic -coverprofile=coverage.txt $(SOURCE_FILES) -run $(TEST_PATTERN) -timeout=2m
.PHONY: test
# Run all the tests and opens the coverage report
cover: test
@$(GO) tool cover -html=coverage.txt
.PHONY: cover
# 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
.PHONY: setup test cover generate-mocks