bottin/Makefile

29 lines
1.1 KiB
Makefile
Raw Normal View History

## This Makefile uses the help target explained in the following blogpost:
##
## https://victoria.dev/blog/how-to-create-a-self-documenting-makefile/
.DEFAULT_GOAL := help
.PHONY: help
help: ## Show this help
@egrep -h '\s##\s' $(MAKEFILE_LIST) | \
sort | \
awk \
'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.PHONY: test-integration
test-integration: ## run integration tests through API client. Config is read from `~/.bottin.yaml`. WARNING: affects data in the database, do not run on production server
docker-compose down && docker-compose up -d --build && sleep 2 && go test
.PHONY: dev
dev: generate-self-signed-x509 compose-inject-x509 ## deploy development environment on docker-compose
docker-compose up -d
.PHONY: generate-self-signed-x509
generate-self-signed-x509: ## Générer une paire de clés x509 self-signed pour utilisation avec un serveur de développement
./scripts/generate-self-signed-x509.sh
.PHONY: compose-inject-x509
compose-inject-x509: ## Copie la paire de clés x509 du current directory vers les containers orchestrés par docker-compose
./scripts/compose-inject-x509.sh