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

67 lines
1.4 KiB
Makefile
Raw Normal View History

2023-10-11 17:04:49 +02:00
SERVICENAME=telegram_loki
SERVICEURL=github.com/ManyakRus/$(SERVICENAME)
2024-11-01 14:02:44 +02:00
FILEMAIN=./cmd/$(SERVICENAME)/main.go
2023-10-11 17:04:49 +02:00
FILEAPP=./bin/$(SERVICENAME)
NEW_REPO=github.com/ManyakRus/telegram_loki
run:
clear
2024-11-01 14:02:44 +02:00
./make_version.sh
2023-10-11 17:04:49 +02:00
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 ./...
2024-10-28 08:48:56 +02:00
go mod tidy -compat=1.22
2023-10-11 17:04:49 +02:00
go mod vendor
2024-11-01 14:02:44 +02:00
./make_version.sh
2023-10-11 17:04:49 +02:00
go fmt ./...
build:
clear
2024-11-01 14:02:44 +02:00
./make_version.sh
2023-10-11 17:04:49 +02:00
go build -race -o $(FILEAPP) $(FILEMAIN)
cd ./cmd && \
./VersionToFile.py
lint:
clear
2024-11-01 14:02:44 +02:00
./make_version.sh
2023-10-11 17:04:49 +02:00
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
2024-11-01 14:02:44 +02:00
./make_version.sh
2023-10-11 17:04:49 +02:00
go fmt ./...
go test -coverprofile cover.out ./internal/v0/app/...
go tool cover -func=cover.out
newrepo:
2024-11-01 14:02:44 +02:00
clear
./make_version.sh
2023-10-11 17:04:49 +02:00
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)
lines:
clear
2024-11-01 14:02:44 +02:00
./make_version.sh
go_lines_count ./ ./docs/lines_count.txt 10
licenses:
golicense -out-xlsx=./docs/licenses.xlsx $(FILEAPP)
2024-09-27 10:01:19 +02:00
gocyclo:
golangci-lint run ./... --disable-all -E gocyclo -v