Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. # A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
  2. # see https://github.com/mongodb/mongocli/blob/master/Makefile
  3. TEST_CMD?=go test
  4. UNIT_TAGS?=unit
  5. INTEGRATION_TAGS?=integration
  6. .PHONY: dltest
  7. dltest: ## Clone test sample files
  8. @echo "==> Cloning test sample files..."
  9. git clone https://github.com/wyq977/CSFTestFiles.git TestData
  10. .PHONY: test
  11. test: temp-test
  12. .PHONY: temp-test
  13. temp-test: ## [TEMP] Run simple test scripts
  14. @scripts/temp-test.sh
  15. # .PHONY: unit-test
  16. # unit-test: ## Run unit-tests
  17. # @echo "==> Running unit tests..."
  18. # $(TEST_CMD) --tags="$(UNIT_TAGS)" -race -cover -count=1 -coverprofile $(COVERAGE) ./internal...
  19. .PHONY: list
  20. list: ## List all make targets
  21. @${MAKE} -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | sort
  22. .PHONY: help
  23. .DEFAULT_GOAL := help
  24. help:
  25. @grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'