generated from ConduitIO/conduit-connector-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (40 loc) · 1.27 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
VERSION=$(shell git describe --tags --dirty --always)
.PHONY: build
build:
go build -ldflags "-X 'github.com/conduitio-labs/conduit-connector-pulsar.version=${VERSION}'" -o conduit-connector-pulsar cmd/connector/main.go
.PHONY: test
test:
docker compose -f test/docker-compose.yml up pulsar --quiet-pull -d --wait
go test -v -count=1 -race .; ret=$$?; \
docker compose -f test/docker-compose.yml down && \
exit $$ret
.PHONY: test-tls
test-tls:
docker compose -f test/docker-compose.yml up pulsar-tls --quiet-pull -d --wait
export PULSAR_TLS=true && \
go test -v -count=1 -run TLS -race .; ret=$$?; \
docker compose -f test/docker-compose.yml down && \
exit $$ret
.PHONY: test-debug
test-debug:
make test GOTEST_FLAGS="-v -count=1"
.PHONY: acceptance
acceptance:
go test -run Acceptance -v -count=1 .
.PHONY: generate
generate:
go generate ./...
.PHONY: lint
lint:
golangci-lint run
.PHONY: install-tools
install-tools:
@echo Installing tools from tools.go
@go list -e -f '{{ join .Imports "\n" }}' tools.go | xargs -I % go list -f "%@{{.Module.Version}}" % | xargs -tI % go install %
@go mod tidy
.PHONY: up
up:
docker compose -f test/docker-compose.yml up pulsar --quiet-pull -d --wait
.PHONY: down
down:
docker compose -f test/docker-compose.yml down --remove-orphans