aides-repo-api/Makefile
Maxim Slipenko db49ea2c51
All checks were successful
Format and Lint / format-check (push) Successful in 14m34s
chore: wip
2024-12-17 19:28:37 +03:00

34 lines
950 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
release:
go build \
-ldflags="-s -w -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 .