Makefile 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. .PHONY: test admin-generate admin-build admin-clean admin-dev admin-run admin-test admin-fmt admin-help
  2. BINARY = weed
  3. ADMIN_DIR = weed/admin
  4. SOURCE_DIR = .
  5. debug ?= 0
  6. all: install
  7. install: admin-generate
  8. cd weed; go install
  9. warp_install:
  10. go install github.com/minio/warp@v0.7.6
  11. full_install: admin-generate
  12. cd weed; go install -tags "elastic gocdk sqlite ydb tarantool tikv rclone"
  13. server: install
  14. weed -v 0 server -s3 -filer -filer.maxMB=64 -volume.max=0 -master.volumeSizeLimitMB=100 -volume.preStopSeconds=1 -s3.port=8000 -s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=true -s3.config=./docker/compose/s3.json -metricsPort=9324
  15. benchmark: install warp_install
  16. pkill weed || true
  17. pkill warp || true
  18. weed server -debug=$(debug) -s3 -filer -volume.max=0 -master.volumeSizeLimitMB=100 -volume.preStopSeconds=1 -s3.port=8000 -s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=false -s3.config=./docker/compose/s3.json &
  19. warp client &
  20. while ! nc -z localhost 8000 ; do sleep 1 ; done
  21. warp mixed --host=127.0.0.1:8000 --access-key=some_access_key1 --secret-key=some_secret_key1 --autoterm
  22. pkill warp
  23. pkill weed
  24. # curl -o profile "http://127.0.0.1:6060/debug/pprof/profile?debug=1"
  25. benchmark_with_pprof: debug = 1
  26. benchmark_with_pprof: benchmark
  27. test: admin-generate
  28. cd weed; go test -tags "elastic gocdk sqlite ydb tarantool tikv rclone" -v ./...
  29. # Admin component targets
  30. admin-generate:
  31. @echo "Generating admin component templates..."
  32. @cd $(ADMIN_DIR) && $(MAKE) generate
  33. admin-build: admin-generate
  34. @echo "Building admin component..."
  35. @cd $(ADMIN_DIR) && $(MAKE) build
  36. admin-clean:
  37. @echo "Cleaning admin component..."
  38. @cd $(ADMIN_DIR) && $(MAKE) clean
  39. admin-dev:
  40. @echo "Starting admin development server..."
  41. @cd $(ADMIN_DIR) && $(MAKE) dev
  42. admin-run:
  43. @echo "Running admin server..."
  44. @cd $(ADMIN_DIR) && $(MAKE) run
  45. admin-test:
  46. @echo "Testing admin component..."
  47. @cd $(ADMIN_DIR) && $(MAKE) test
  48. admin-fmt:
  49. @echo "Formatting admin component..."
  50. @cd $(ADMIN_DIR) && $(MAKE) fmt
  51. admin-help:
  52. @echo "Admin component help..."
  53. @cd $(ADMIN_DIR) && $(MAKE) help