1
0
mirror of https://github.com/ManyakRus/crud_generator.git synced 2024-11-27 08:40:53 +02:00
crud_generator/Makefile

57 lines
1.2 KiB
Makefile
Raw Normal View History

2023-09-28 16:45:44 +02:00
SERVICENAME=crud_generator
SERVICEURL=github.com/ManyakRus/$(SERVICENAME)
2023-11-15 16:59:21 +02:00
FILEMAIN=./cmd/$(SERVICENAME)/main.go
2023-09-28 16:45:44 +02:00
FILEAPP=./bin/$(SERVICENAME)
NEW_REPO=$(SERVICENAME)
run:
clear
go build -race -o $(FILEAPP) $(FILEMAIN)
# cd ./bin && \
2023-11-15 16:59:21 +02:00
./bin/$(SERVICENAME)
2023-09-28 16:45:44 +02:00
mod:
clear
2024-03-06 16:45:55 +02:00
go get -u ./internal/...
2023-09-28 16:45:44 +02:00
go mod tidy -compat=1.18
go mod vendor
go fmt ./...
build:
clear
go build -race -o $(FILEAPP) $(FILEMAIN)
2023-11-15 16:59:21 +02:00
cd ./scripts && \
2023-09-28 16:45:44 +02:00
./VersionToFile.py
lint:
clear
go fmt ./...
2023-10-23 17:09: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-09-28 16:45:44 +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)
2024-03-15 10:45:00 +02:00
lines:
clear
2024-09-06 14:10:00 +02:00
go_lines_count ./ ./docs/lines_count.txt 3
2024-03-22 13:17:07 +02:00
licenses:
golicense -out-xlsx=./docs/licenses.xlsx $(FILEAPP)