Makefile 882 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. -include local/Makefile
  2. all: deps build
  3. deps-go:
  4. go run build.go setup
  5. deps-js: node_modules
  6. deps: deps-js
  7. build-go:
  8. go run build.go build
  9. build-server:
  10. go run build.go build-server
  11. build-cli:
  12. go run build.go build-cli
  13. build-js:
  14. yarn run build
  15. build: build-go build-js
  16. build-docker-dev:
  17. @echo "\033[92mInfo:\033[0m the frontend code is expected to be built already."
  18. go run build.go -goos linux -pkg-arch amd64 ${OPT} build package-only latest
  19. cp dist/grafana-latest.linux-x64.tar.gz packaging/docker
  20. cd packaging/docker && docker build --tag grafana/grafana:dev .
  21. build-docker-full:
  22. docker build --tag grafana/grafana:dev .
  23. test-go:
  24. go test -v ./pkg/...
  25. test-js:
  26. yarn test
  27. test: test-go test-js
  28. run:
  29. ./bin/grafana-server
  30. clean:
  31. rm -rf node_modules
  32. rm -rf public/build
  33. node_modules: package.json yarn.lock
  34. yarn install --pure-lockfile --no-progress