aides-repo-api/Makefile

29 lines
785 B
Makefile

GIT_VERSION = $(shell git describe --tags )
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
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=$(GIT_VERSION)'" \
-o aides-repo-api \
./cmd/aides-repo-api/main.go
build-docker:
docker build -t ghcr.io/aides-infra/aides-repo-api .
.PHONY: format swag