-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
35 lines (28 loc) · 928 Bytes
/
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
VERSION=$(shell git describe --tags --dirty --always)
.PHONY: build
build:
go build -ldflags "-X 'github.com/conduitio/conduit-connector-connectorname.version=${VERSION}'" -o conduit-connector-connectorname cmd/connector/main.go
.PHONY: test
test:
go test $(GOTEST_FLAGS) -race ./...
.PHONY: test-integration
test-integration:
# run required docker containers, execute integration tests, stop containers after tests
docker compose -f test/docker-compose.yml up -d
go test $(GOTEST_FLAGS) -v -race ./...; ret=$$?; \
docker compose -f test/docker-compose.yml down; \
exit $$ret
.PHONY: generate
generate:
go generate ./...
.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: fmt
fmt:
gofumpt -l -w .
.PHONY: lint
lint:
golangci-lint run