forked from aws/aws-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (44 loc) · 1.6 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
47
48
49
50
51
52
53
54
55
56
57
LINTIGNOREDOT='internal/features.+should not use dot imports'
LINTIGNOREDOC='service/[^/]+/(api|service)\.go:.+(comment on exported|should have comment or be unexported)'
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " api_info to print a list of services and versions"
@echo " build to go build the SDK"
@echo " deps to go get the SDK dependencies"
@echo " docs to build SDK documentation"
@echo " generate to go generate and make services"
@echo " generate-protocol-test to generate protocol tests"
@echo " integration to run integration tests"
@echo " lint to lint the SDK"
@echo " services to generate services"
@echo " unit to run unit tests"
default: generate
generate-protocol-test:
go generate ./internal/protocol/...
generate-test: generate-protocol-test
generate:
go generate ./internal/endpoints
@make services
services:
go generate ./service
integration: deps
go test ./internal/test/integration/... -tags=integration
gucumber
lint: deps
@echo "golint ./..."
@lint=`golint ./...`; \
lint=`echo "$$lint" | grep -E -v -e ${LINTIGNOREDOT} -e ${LINTIGNOREDOC}`; \
echo "$$lint"; \
if [ "$$lint" != "" ]; then exit 1; fi
unit: deps build lint
go test ./...
build:
go build ./...
docs:
rm -rf doc && bundle install && bundle exec yard
deps:
@go get ./...
@go get github.com/lsegal/gucumber/cmd/gucumber
@go get github.com/golang/lint/golint
api_info:
@go run internal/model/cli/api-info/api-info.go