1
0

Makefile 755 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. export PATH := $(GOPATH)/bin:$(PATH)
  2. all: fmt build
  3. build: frps frpc
  4. # compile assets into binary file
  5. file:
  6. rm -rf ./assets/static/*
  7. cp -rf ./web/frps/dist/* ./assets/static
  8. go get -d github.com/rakyll/statik
  9. go install github.com/rakyll/statik
  10. rm -rf ./assets/statik
  11. go generate ./assets/...
  12. fmt:
  13. go fmt ./...
  14. frps:
  15. go build -o bin/frps ./cmd/frps
  16. @cp -rf ./assets/static ./bin
  17. frpc:
  18. go build -o bin/frpc ./cmd/frpc
  19. test: gotest
  20. gotest:
  21. go test -v --cover ./assets/...
  22. go test -v --cover ./client/...
  23. go test -v --cover ./cmd/...
  24. go test -v --cover ./models/...
  25. go test -v --cover ./server/...
  26. go test -v --cover ./utils/...
  27. ci:
  28. go test -count=1 -v ./tests/...
  29. alltest: gotest ci
  30. clean:
  31. rm -f ./bin/frpc
  32. rm -f ./bin/frps