-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (45 loc) · 2.79 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
.PHONY: all help test %
all: help
%: ; @:
help: ## Autogenerated list of commands
@echo "Usage: make [command]"
@echo
@echo "Commands:"
@echo
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-25s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
build: ## Build the project
@docker build -t dev-telephonic:dev --target base .
@$(MAKE) composer-install
composer-install: ## Install composer dependencies
@docker run --rm --user "${UID}":"${GID}" -v "${PWD}":/app -w /app dev-telephonic:dev composer install
composer-update: ## Update composer dependencies
@docker run --rm --user "${UID}":"${GID}" -v "${PWD}":/app -v /Users/jamuriano/personal-workspace/opentelemetry-php-cloud-trace-exporter:/dependency -w /app dev-telephonic:dev composer update $(filter-out $@,$(MAKECMDGOALS))
composer-require: ## Require composer dependencies
@docker run --rm --tty --user "${UID}":"${GID}" -v "${PWD}":/app -v /Users/jamuriano/personal-workspace/opentelemetry-php-cloud-trace-exporter:/dependency -w /app dev-telephonic:dev composer require $(filter-out $@,$(MAKECMDGOALS))
composer-require-dev: ## Require composer dev dependencies
@docker run --rm --tty --user "${UID}":"${GID}" -v "${PWD}":/app -v /Users/jamuriano/personal-workspace/opentelemetry-php-cloud-trace-exporter:/dependency -w /app dev-telephonic:dev composer require --dev $(filter-out $@,$(MAKECMDGOALS))
composer-why: ## Show why a package is installed
@docker run --rm --user "${UID}":"${GID}" -v "${PWD}":/app -v /Users/jamuriano/personal-workspace/opentelemetry-php-cloud-trace-exporter:/dependency -w /app dev-telephonic:dev composer why $(filter-out $@,$(MAKECMDGOALS))
test: ## Run the tests
@docker run --rm --tty --user "${UID}":"${GID}" -v "${PWD}":/app -w /app dev-telephonic:dev php vendor/bin/phpunit --colors=always --no-coverage --stop-on-failure
test-coverage: ## Run the tests with coverage
@docker run --rm --tty --user "${UID}":"${GID}" -e "XDEBUG_MODE=coverage" -v "${PWD}":/app -w /app dev-telephonic:dev php vendor/bin/phpunit --colors=always --stop-on-failure
run-example: up ## Run the project
@docker compose exec app php $(filter-out $@,$(MAKECMDGOALS));
up: ## Start the project
@docker compose up -d
down: ## Stop the project
@docker compose down
# RELEASES -------------------------------------------------------------------------------------------------------------
.ONESHELL:
release: release-start release-finish ## Generate Changelog file and new version tag and upload it to the server
release-start:
@cz ch --dry-run
@cz bump --dry-run
@echo "Confirmation required:"
@echo "If above info is correct press any key to continue. If not, press CTRL+C to stop publishing a release"
@read none
@cz bump --changelog -at
release-finish:
@echo "Uploading release to git origin"
@git push --no-verify && git push --tags --no-verify