1
0
mirror of https://github.com/ManyakRus/telegram_loki.git synced 2024-12-12 09:33:50 +02:00
telegram_loki/Makefile

52 lines
1.1 KiB
Makefile
Raw Normal View History

2023-10-11 17:04:49 +02:00
SERVICENAME=telegram_loki
SERVICEURL=github.com/ManyakRus/$(SERVICENAME)
FILEMAIN=./internal/main.go
FILEAPP=./bin/$(SERVICENAME)
NEW_REPO=github.com/ManyakRus/telegram_loki
run:
clear
go build -race -o $(FILEAPP) $(FILEMAIN)
# cd ./bin && \
2023-10-13 13:44:55 +02:00
./bin/$(SERVICENAME)
2023-10-11 17:04:49 +02:00
mod:
clear
go get -u ./...
go mod tidy -compat=1.18
go mod vendor
go fmt ./...
build:
clear
go build -race -o $(FILEAPP) $(FILEMAIN)
cd ./cmd && \
./VersionToFile.py
lint:
clear
go fmt ./...
2023-10-13 13:44:55 +02:00
golangci-lint run ./internal/...
golangci-lint run ./pkg/...
gocyclo -over 10 ./internal
gocyclo -over 10 ./pkg
gocritic check ./internal/...
gocritic check ./pkg/...
staticcheck ./internal/...
staticcheck ./pkg/...
2023-10-11 17:04:49 +02:00
run.test:
clear
go fmt ./...
go test -coverprofile cover.out ./internal/v0/app/...
go tool cover -func=cover.out
newrepo:
sed -i 's+$(SERVICEURL)+$(NEW_REPO)+g' go.mod
find -name *.go -not -path "*/vendor/*"|xargs sed -i 's+$(SERVICEURL)+$(NEW_REPO)+g'
graph:
clear
image_packages ./ docs/packages.graphml
conn:
clear
image_connections ./internal docs/connections.graphml $(SERVICENAME)