Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. server.build:
  2. clear
  3. go fmt ./...
  4. go build -o ./bin/server ./cmd/server/main.go
  5. strip -s ./bin/server
  6. upx -f ./bin/server
  7. desktop.build:
  8. clear
  9. go fmt ./...
  10. go build -o ./bin/desktop ./cmd/desktop/main.go
  11. strip -s ./bin/desktop
  12. upx -f ./bin/desktop
  13. pwa.build:
  14. clear
  15. go fmt ./...
  16. go build -o ./bin/pwa ./cmd/pwa/main.go
  17. strip -s ./bin/pwa
  18. upx -f ./bin/pwa
  19. GOARCH=wasm GOOS=js go build -o ./bin/web/app.wasm ./cmd/pwa/main.go
  20. runner.build:
  21. clear
  22. go fmt ./...
  23. go build -o ./bin/serv_run ./cmd/serv_run/main.go
  24. strip -s ./bin/serv_run
  25. upx -f ./bin/serv_run
  26. server.run:
  27. clear
  28. go fmt ./...
  29. go build -o ./bin/server_dev ./cmd/server/main.go
  30. ./run_server.sh
  31. desktop.run:
  32. clear
  33. go fmt ./...
  34. go build -race -o ./bin/desktop-race ./cmd/desktop/main.go
  35. ./run_desktop.sh
  36. pwa.run:
  37. clear
  38. go fmt ./...
  39. go build -race -o ./bin/pwa-race ./cmd/pwa/main.go
  40. GOARCH=wasm GOOS=js go build -o ./bin/web/app.wasm ./cmd/pwa/main.go
  41. cd ./bin && \
  42. ./pwa-race
  43. test.run:
  44. clear
  45. go fmt ./...
  46. go test --cover -coverprofile=coverage.txt ./cmd/... ./internal/... ./pkg/...
  47. go tool cover -func=coverage.txt
  48. mod:
  49. clear
  50. go mod tidy
  51. go mod vendor
  52. go fmt ./...
  53. lint:
  54. clear
  55. go fmt ./...
  56. golangci-lint run ./cmd/serv_old/...
  57. golangci-lint run ./cmd/client_pwa/...
  58. golangci-lint run ./internal/...