Comments, doc comments, test names, error and log messages, CLI help, README, Makefile, CI step names and the design document are now all in English. No behaviour changes; the full suite passes under the race detector. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
33 lines
774 B
Makefile
33 lines
774 B
Makefile
MODULE := gitea.mynodes.xyz/ilker/llmgw
|
|
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
|
|
LDFLAGS := -X '$(MODULE)/internal/version.Version=$(VERSION)'
|
|
|
|
.PHONY: build test race lint fmt clean rename
|
|
|
|
build:
|
|
go build -ldflags "$(LDFLAGS)" -o bin/llmgw ./cmd/llmgw
|
|
|
|
test:
|
|
go test ./...
|
|
|
|
race:
|
|
go test -race ./...
|
|
|
|
lint:
|
|
golangci-lint run
|
|
|
|
fmt:
|
|
go fmt ./...
|
|
go vet ./...
|
|
|
|
clean:
|
|
rm -rf bin dist
|
|
|
|
# Change the module path: make rename NEW=git.example.com/team/llmgw
|
|
rename:
|
|
@test -n "$(NEW)" || (echo "usage: make rename NEW=<new/module/path>"; exit 1)
|
|
go mod edit -module=$(NEW)
|
|
grep -rl '$(MODULE)' --include='*.go' . | xargs sed -i '' 's|$(MODULE)|$(NEW)|g'
|
|
sed -i '' 's|^MODULE := .*|MODULE := $(NEW)|' Makefile
|
|
go build ./...
|