Files
cc-metric-store/Makefile
T
moebiusband 5cb80a03df Update dependencies and add gofumpt Makefile target
Bump cc-backend to v1.5.4 and cc-lib to v2.12.0 with transitive
dependency updates, add a `make fmt` target running gofumpt, ignore
the dist directory, and reformat multi-line calls to gofumpt style.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Entire-Checkpoint: 09016e793f9b
2026-07-13 10:15:13 +02:00

46 lines
981 B
Makefile

TARGET = ./cc-metric-store
VAR = ./var/checkpoints/
VERSION = 1.5.3
GIT_HASH := $(shell git rev-parse --short HEAD || echo 'development')
CURRENT_TIME = $(shell date +"%Y-%m-%d:T%H:%M:%S")
LD_FLAGS = '-s -X main.date=${CURRENT_TIME} -X main.version=${VERSION} -X main.commit=${GIT_HASH}'
.PHONY: clean distclean test swagger fmt $(TARGET)
.NOTPARALLEL:
$(TARGET): config.json $(VAR)
$(info ===> BUILD cc-metric-store)
@go build -ldflags=${LD_FLAGS} ./cmd/cc-metric-store
config.json:
@cp ./configs/config.json config.json
$(VAR):
@mkdir -p $(VAR)
swagger:
$(info ===> GENERATE swagger)
@go run github.com/swaggo/swag/cmd/swag init -d ./internal/api -g api.go -o ./api
@mv ./api/docs.go ./internal/api/docs.go
clean:
$(info ===> CLEAN)
@go clean
@rm -f $(TARGET)
distclean: clean
@rm -rf ./var
@rm -f config.json
test:
$(info ===> TESTING)
@go clean -testcache
@go build ./...
@go vet ./...
@go test ./...
fmt:
$(info ===> FORMAT)
@gofumpt -l -w .