build: refine Makefile with user-preferred build and test flags

This commit is contained in:
stevef 2026-04-19 22:29:19 +02:00
parent 88c641fbec
commit 8cbbc852e2

View file

@ -309,12 +309,12 @@ vet: generate
## test: Test Go code
test: generate
@$(GO) test $(GOFLAGS) $$($(GO) list $(GOFLAGS) ./... | grep -v github.com/sipeed/picoclaw/web/)
@$(GO) test $(GOFLAGS) -p 1 $$($(GO) list $(GOFLAGS) ./... | grep -v github.com/sipeed/picoclaw/web/) -timeout 120s
@cd web && make test
## fmt: Format Go code
fmt:
@go fmt ./...
@gofmt -s -w $$(find . -name "*.go" -not -path "./web/*" -not -path "./vendor/*")
## lint-docs: Check common documentation layout and naming conventions
lint-docs:
@ -369,7 +369,7 @@ docker-run:
## docker-build-rpi: Build Raspberry Pi specific Docker image (ARM64)
docker-build-rpi:
@echo "Building Raspberry Pi Docker image (ARM64)..."
docker build --platform linux/arm64 -t $(DOCKER_USER)/picoclaw-rpi:latest -f docker/Dockerfile.rpi .
docker build --no-cache --platform linux/arm64 -t $(DOCKER_USER)/picoclaw-rpi:latest -f docker/Dockerfile.rpi .
## docker-push-rpi: Push Raspberry Pi specific Docker image (ARM64)
docker-push-rpi: