GOLANGCI_LINT := go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.2 SWAG := go run github.com/swaggo/swag/cmd/swag@v1.16.4 GIT_VERSION = $(shell git describe --tags) APP_VERSION ?= $(GIT_VERSION) DOCKER_TAG ?= $(APP_VERSION) format: @echo "🛠️ Format and Lint code with golangci-lint" $(GOLANGCI_LINT) run $(SWAG) fmt @echo "✅ Format and Lint done." format-fix: @echo "🛠️ Format and Lint code with golangci-lint" $(GOLANGCI_LINT) run --fix $(SWAG) fmt @echo "✅ Format and Lint done." swag: $(SWAG) init -g cmd/aides-repo-api/main.go build: go build \ -ldflags="-X 'code.alt-gnome.ru/aides-infra/aides-repo-api/internal/config.Version=$(APP_VERSION)'" \ -o aides-repo-api \ ./cmd/aides-repo-api/main.go release: go build \ -ldflags="-s -w -X 'code.alt-gnome.ru/aides-infra/aides-repo-api/internal/config.Version=$(APP_VERSION)'" \ -o aides-repo-api \ ./cmd/aides-repo-api/main.go build-docker: docker build \ --build-arg APP_VERSION=${APP_VERSION} \ -t ghcr.io/aides-infra/aides-repo-api:${DOCKER_TAG}\ . test-coverage: go test ./... -v -coverpkg=./... -coverprofile=coverage.out bash scripts/coverage-badge.sh