github.com/twilio/twilio-go@v1.20.1/Makefile (about) 1 .PHONY: githooks install test test-docker goimports govet golint docker-build docker-push cover 2 3 githooks: 4 ln -sf ../../githooks/pre-commit .git/hooks/pre-commit 5 6 install: 7 go build -v ./... 8 9 test: 10 go test -race ./... 11 12 test-docker: 13 docker build -t twilio/twilio-go . 14 docker run twilio/twilio-go go test -race ./... 15 16 cluster-test: 17 go test -race --tags=cluster 18 19 webhook-cluster-test: 20 go test -race --tags=webhook_cluster 21 22 goimports: 23 go install golang.org/x/tools/cmd/goimports@latest 24 goimports -w . 25 go mod tidy 26 27 govet: goimports 28 go vet ./... 29 30 golint: govet 31 go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.39.0 32 golangci-lint run 33 34 API_DEFINITIONS_SHA=$(shell git log --oneline | grep Regenerated | head -n1 | cut -d ' ' -f 5) 35 CURRENT_TAG=$(shell [[ "${GITHUB_TAG}" == *"-rc"* ]] && echo "rc" || echo "latest") 36 docker-build: 37 docker build -t twilio/twilio-go . 38 docker tag twilio/twilio-go twilio/twilio-go:${GITHUB_TAG} 39 docker tag twilio/twilio-go twilio/twilio-go:apidefs-${API_DEFINITIONS_SHA} 40 docker tag twilio/twilio-go twilio/twilio-go:${CURRENT_TAG} 41 42 docker-push: 43 docker push twilio/twilio-go:${GITHUB_TAG} 44 docker push twilio/twilio-go:apidefs-${API_DEFINITIONS_SHA} 45 docker push twilio/twilio-go:${CURRENT_TAG} 46 47 GO_DIRS = $(shell go list ./... | grep -v /rest/ | grep -v /form ) 48 cover: 49 go test ${GO_DIRS} -coverprofile coverage.out 50 go test ${GO_DIRS} -json > test-report.out