openmeter / quickstart /Makefile
Leon4gr45's picture
Upload folder using huggingface_hub (part 10)
6380833 verified
Raw
History Blame Contribute Delete
1.12 kB
# A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.PHONY: test-local
test-local: ## Run quickstart tests against a local stack with debug ports exposed
$(call print-target)
$(MAKE) env-local-down
$(MAKE) env-local-up
curl --retry 10 --retry-max-time 120 --retry-all-errors http://localhost:40000/healthz
OPENMETER_ADDRESS=http://localhost:48888 go test -count=1 -v ./...
$(MAKE) env-local-down
.PHONY: env-local-down
env-local-down:
$(call print-target)
docker compose \
-f docker-compose.yaml \
-f docker-compose.debug-ports.yaml \
down
.PHONY: env-local-up
env-local-up:
$(call print-target)
docker compose \
-f docker-compose.yaml \
-f docker-compose.debug-ports.yaml \
up -d --force-recreate
.PHONY: help
.DEFAULT_GOAL := help
help:
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
# Variable outputting/exporting rules
var-%: ; @echo $($*)
varexport-%: ; @echo $*=$($*)
define print-target
@printf "Executing target: \033[36m$@\033[0m\n"
endef