Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. compile: daemon-compile-x64-lin
  2. daemon-compile-armhf:
  3. GOARCH=arm GOARM=6 go build -o OliveTin.armhf github.com/jamesread/OliveTin/cmd/OliveTin
  4. daemon-compile-x64-lin:
  5. GOOS=linux go build -o OliveTin github.com/jamesread/OliveTin/cmd/OliveTin
  6. daemon-compile-x64-win:
  7. GOOS=windows GOARCH=amd64 go build -o OliveTin.exe github.com/jamesread/OliveTin/cmd/OliveTin
  8. daemon-compile: daemon-compile-armhf daemon-compile-x64-lin daemon-compile-x64-win
  9. daemon-codestyle:
  10. go fmt ./...
  11. go vet ./...
  12. golint ./...
  13. gocyclo -over 3 cmd internal
  14. daemon-unittests:
  15. mkdir -p reports
  16. go test ./... -coverprofile reports/unittests.out
  17. go tool cover -html=reports/unittests.out -o reports/unittests.html
  18. go-tools:
  19. go install "github.com/bufbuild/buf/cmd/buf"
  20. go install "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway"
  21. go install "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2"
  22. go install "google.golang.org/grpc/cmd/protoc-gen-go-grpc"
  23. go install "google.golang.org/protobuf/cmd/protoc-gen-go"
  24. grpc: go-tools
  25. buf generate
  26. podman-image:
  27. buildah bud -t olivetin
  28. podman-container:
  29. podman kill olivetin
  30. podman rm olivetin
  31. podman create --name olivetin -p 1337:1337 -v /etc/OliveTin/:/config:ro olivetin
  32. podman start olivetin
  33. devrun: compile
  34. killall OliveTin || true
  35. ./OliveTin &
  36. devcontainer: compile podman-image podman-container
  37. webui-codestyle:
  38. cd webui && eslint main.js js/*
  39. cd webui && stylelint style.css
  40. clean:
  41. rm -rf dist OliveTin OliveTin.armhf OliveTin.exe reports gen
  42. .PHONY: grpc