-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
39 lines (30 loc) · 999 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
37
38
39
SOCKET_FILE=/tmp/locatr.sock
BINARY_PATH=server/locatr.bin
PYTHON_CLIENT_BIN=python_client/locatr/bin/
.PHONY: all build run clean
all: build
build:
cd server && go build -o locatr.bin . || { echo "Go build failed"; exit 1; }
mkdir -p ${PYTHON_CLIENT_BIN}
mv $(BINARY_PATH) $(PYTHON_CLIENT_BIN) || { echo "Failed to move the binary"; exit 1; }
echo "Build and move successful."
run:
cd server && \
trap 'rm -rf $(SOCKET_FILE); exit' INT TERM EXIT && \
go run . -socketFilePath=$(SOCKET_FILE)
clean:
rm -rf dist
publish: clean build
uv build
uv publish
# Go coverage targets
.PHONY: go-test-coverage
go-test-coverage:
go test ./golang/... -coverprofile=coverage.out -covermode=atomic
go tool cover -html=coverage.out -o coverage.html
# Python coverage targets
.PHONY: python-test-coverage
python-test-coverage:
uv run python -m pytest --cov=python_client --cov-report=html --cov-config=pyproject.toml
.PHONY: test-coverage
test-coverage: go-test-coverage python-test-coverage