-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (30 loc) · 954 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
36
VERSION=$(shell git describe --tags --dirty --always)
.PHONY: build
build:
go build -ldflags "-X 'github.com/conduitio-labs/conduit-connector-oracle.version=${VERSION}'" -o conduit-connector-oracle cmd/connector/main.go
.PHONY: test
test:
docker compose -f test/docker-compose.yml up --quiet-pull -d
@echo "Waiting for Oracle to become healthy..."
@while [ "$$(docker inspect -f '{{.State.Health.Status}}' test-oracle-1)" != "healthy" ]; do \
echo "Waiting..."; \
sleep 5; \
done
@echo "Oracle is healthy. Running tests..."
go test $(GOTEST_FLAGS) -race ./...; ret=$$?; \
docker compose -f test/docker-compose.yml down --volumes; \
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 -tI % go install %
@go mod tidy
.PHONY: fmt
fmt:
gofumpt -l -w .
.PHONY: lint
lint:
golangci-lint run -v