1
0
mirror of https://github.com/ManyakRus/telegram_loki.git synced 2024-12-12 09:33:50 +02:00
telegram_loki/Makefile
Nikitin Aleksandr 5e52218611 новый
2023-10-11 18:04:49 +03:00

53 lines
1.1 KiB
Makefile

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 && \
./bin/app_race
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
cp $(FILEAPP) $(GOPATH)/bin
lint:
clear
go fmt ./...
golangci-lint run ./internal/v0/...
golangci-lint run ./pkg/v0/...
gocyclo -over 10 ./internal/v0
gocyclo -over 10 ./pkg/v0
gocritic check ./internal/v0/...
gocritic check ./pkg/v0/...
staticcheck ./internal/v0/...
staticcheck ./pkg/v0/...
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)