Makefile 936 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. SERVICE_URL=gitlab.aescorp.ru/dsp_dev/claim/cryptopro_service
  2. FILE_MAIN=./cmd/ouc/main.go
  3. ADAPT_PATH = ./api
  4. build:
  5. clear
  6. go fmt ./...
  7. go build -o ./bin/ouc $(FILE_MAIN)
  8. cp ./src ./bin
  9. win.build:
  10. clear
  11. go fmt ./...
  12. GOOS=windows GOARCH=amd64 go build -o ./bin/ouc.exe $(FILE_MAIN)
  13. dev.run:
  14. clear
  15. go fmt ./...
  16. go build -race -o ./bin/ouc_dev $(FILE_MAIN)
  17. cp -r ./src ./bin
  18. ./dev.sh
  19. mod:
  20. clear
  21. go get -u ./...
  22. go mod tidy -compat=1.20
  23. go mod vendor
  24. go fmt ./...
  25. lint:
  26. clear
  27. go fmt ./...
  28. golangci-lint run ./...
  29. gocyclo -over 10 ./internal/
  30. gocyclo -over 10 ./pkg/
  31. gocritic check ./internal/...
  32. gocritic check ./pkg/...
  33. staticcheck ./internal/...
  34. staticcheck ./pkg/...
  35. test.run:
  36. clear
  37. go fmt ./...
  38. go test -vet=all -race -timeout 30s -coverprofile cover.out ./...
  39. go tool cover -func=cover.out
  40. graph:
  41. goda graph -f "{{.Package.Name}}" "shared($(SERVICE_URL)/... $(SERVICE_URL)/...)" | dot -Tsvg -o graph.svg