Makefile 793 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. export PATH := $(GOPATH)/bin:$(PATH)
  2. export GO111MODULE=on
  3. all: fmt build
  4. build: frps frpc
  5. # compile assets into binary file
  6. file:
  7. rm -rf ./assets/frps/static/*
  8. rm -rf ./assets/frpc/static/*
  9. cp -rf ./web/frps/dist/* ./assets/frps/static
  10. cp -rf ./web/frpc/dist/* ./assets/frpc/static
  11. rm -rf ./assets/frps/statik
  12. rm -rf ./assets/frpc/statik
  13. go generate ./assets/...
  14. fmt:
  15. go fmt ./...
  16. frps:
  17. go build -o bin/frps ./cmd/frps
  18. frpc:
  19. go build -o bin/frpc ./cmd/frpc
  20. test: gotest
  21. gotest:
  22. go test -v --cover ./assets/...
  23. go test -v --cover ./cmd/...
  24. go test -v --cover ./client/...
  25. go test -v --cover ./server/...
  26. go test -v --cover ./pkg/...
  27. ci:
  28. go test -count=1 -p=1 -v ./tests/...
  29. e2e:
  30. ./hack/run-e2e.sh
  31. alltest: gotest ci e2e
  32. clean:
  33. rm -f ./bin/frpc
  34. rm -f ./bin/frps