-
-
Notifications
You must be signed in to change notification settings - Fork 67
Fix make codecept build executing build target unintentionally #400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| .DEFAULT_GOAL := help | ||
|
|
||
| CLI_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) | ||
| $(eval $(CLI_ARGS):;@:) | ||
| $(eval $(filter-out build,$(CLI_ARGS)):;@:) | ||
|
|
||
| include docker/.env | ||
|
|
||
|
|
@@ -23,7 +23,12 @@ DOCKER_COMPOSE_TEST := docker compose -f docker/compose.yml -f docker/test/compo | |
| # | ||
|
|
||
| build: ## Build docker images | ||
| ifneq ($(filter codecept yii,$(MAKECMDGOALS)),) | ||
| @echo "Skipping build target when called with codecept or yii" | ||
| else | ||
| $(DOCKER_COMPOSE_DEV) build $(CLI_ARGS) | ||
| endif | ||
| .PHONY: build | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot Not necessary.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, removed the .PHONY: build declaration. Fixed in commit b840134. |
||
|
|
||
| up: ## Up the dev environment | ||
| $(DOCKER_COMPOSE_DEV) up -d --remove-orphans | ||
|
|
@@ -62,6 +67,7 @@ test-coverage: | |
|
|
||
| codecept: ## Run Codeception | ||
| $(DOCKER_COMPOSE_TEST) run --rm app ./vendor/bin/codecept $(CLI_ARGS) | ||
| .PHONY: codecept | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot Not necessary.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct, removed the .PHONY: codecept declaration. Fixed in commit b840134. |
||
|
|
||
| psalm: ## Run Psalm | ||
| $(DOCKER_COMPOSE_DEV) run --rm app ./vendor/bin/psalm $(CLI_ARGS) | ||
|
|
@@ -89,3 +95,7 @@ prod-deploy: ## PROD | Deploy to production | |
| # Output the help for each task, see https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html | ||
| help: ## This help. | ||
| @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) | ||
|
|
||
| # Catch-all rule to prevent "No rule to make target" errors | ||
| %: | ||
| @: | ||
|
Comment on lines
+99
to
+101
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @copilot Not necessary.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right, the catch-all rule was unnecessary and has been removed. Fixed in commit b840134. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot This change is not necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, this change has been reverted. The CLI_ARGS filtering is no longer needed. Fixed in commit b840134.