-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
33 lines (27 loc) · 950 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
VERSION=$(shell git describe --tags --dirty --always)
.PHONY: build
build:
go build -ldflags "-X 'github.com/conduitio/conduit-connector-postgres.version=${VERSION}'" -o conduit-connector-postgres cmd/connector/main.go
.PHONY: test
test:
# run required docker containers, execute integration tests, stop containers after tests
docker compose -f test/docker-compose.yml up --force-recreate --quiet-pull -d --wait
go test $(GOTEST_FLAGS) -race ./...; ret=$$?; \
docker compose -f test/docker-compose.yml down --volumes; \
exit $$ret
.PHONY: lint
lint:
golangci-lint run
.PHONY: generate
generate:
go generate ./...
conn-sdk-cli readmegen -w
.PHONY: fmt
fmt:
gofumpt -l -w .
gci write --skip-generated .
.PHONY: install-tools
install-tools:
@echo Installing tools from tools/go.mod
@go list -modfile=tools/go.mod tool | xargs -I % go list -modfile=tools/go.mod -f "%@{{.Module.Version}}" % | xargs -tI % go install %
@go mod tidy