xesite/vendor/gopkg.in/segmentio/analytics-go.v3/Makefile

27 lines
745 B
Makefile
Raw Normal View History

2018-08-22 03:17:59 +00:00
ifndef CIRCLE_ARTIFACTS
CIRCLE_ARTIFACTS=tmp
endif
get:
@go get -v -t ./...
vet:
@go vet ./...
build:
@go build ./...
test:
@mkdir -p ${CIRCLE_ARTIFACTS}
@go test -race -coverprofile=${CIRCLE_ARTIFACTS}/cover.out .
@go tool cover -func ${CIRCLE_ARTIFACTS}/cover.out -o ${CIRCLE_ARTIFACTS}/cover.txt
@go tool cover -html ${CIRCLE_ARTIFACTS}/cover.out -o ${CIRCLE_ARTIFACTS}/cover.html
ci: get vet test
@if [ "$(RUN_E2E_TESTS)" != "true" ]; then \
echo "Skipping end to end tests."; else \
go get github.com/segmentio/library-e2e-tester/cmd/tester; \
tester -segment-write-key=$(SEGMENT_WRITE_KEY) -webhook-auth-username=$(WEBHOOK_AUTH_USERNAME) -webhook-bucket=$(WEBHOOK_BUCKET) -path='cli'; fi
.PHONY: get vet build test ci