Makefile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. grpc:
  19. buf generate
  20. podman-image:
  21. buildah bud -t olivetin
  22. podman-container:
  23. podman kill olivetin
  24. podman rm olivetin
  25. podman create --name olivetin -p 1337:1337 -v /etc/OliveTin/:/config:ro olivetin
  26. podman start olivetin
  27. devrun: compile
  28. killall OliveTin || true
  29. ./OliveTin &
  30. devcontainer: compile podman-image podman-container
  31. webui-codestyle:
  32. cd webui && eslint main.js js/*
  33. cd webui && stylelint style.css
  34. clean:
  35. rm -rf dist OliveTin OliveTin.armhf OliveTin.exe reports gen
  36. .PHONY: grpc