Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. compile: daemon-compile
  2. daemon-compile:
  3. go build -o OliveTin github.com/jamesread/OliveTin/cmd/OliveTin
  4. daemon-codestyle:
  5. go fmt ./...
  6. go vet ./...
  7. golint ./...
  8. gocyclo -over 4 cmd internal
  9. daemon-unittests:
  10. mkdir -p reports
  11. go test ./... -coverprofile reports/unittests.out
  12. go tool cover -html=reports/unittests.out -o reports/unittests.html
  13. grpc:
  14. protoc -I.:/usr/share/gocode/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/ --go_out=plugins=grpc:gen/grpc/ OliveTin.proto
  15. protoc -I.:/usr/share/gocode/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/ --grpc-gateway_out=gen/grpc --grpc-gateway_opt paths=source_relative OliveTin.proto
  16. podman-image:
  17. buildah bud -t olivetin
  18. podman-container:
  19. podman kill olivetin
  20. podman rm olivetin
  21. podman create --name olivetin -p 1337:1337 -p 1338:1338 -p 1339:1339 -v /etc/OliveTin/:/config:ro olivetin
  22. podman start olivetin
  23. devrun: compile
  24. killall OliveTin || true
  25. ./OliveTin &
  26. devcontainer: compile podman-image podman-container
  27. webui-codestyle:
  28. cd webui && eslint main.js js/*
  29. cd webui && stylelint style.css
  30. .PHONY: grpc