-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (44 loc) · 1.42 KB
/
Makefile
File metadata and controls
61 lines (44 loc) · 1.42 KB
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
.DEFAULT_GOAL := help
## Setup
install: ## Install npm and composer dependencies
npm install
composer install
setup: install ## Install dependencies and start WordPress environment
npx @wordpress/env start
## Linting
lint: ## Run PHP_CodeSniffer
composer phpcs
lint-fix: ## Auto-fix coding standards issues
composer phpcbf
## Testing
test: ## Run all tests (unit + integration)
composer test
test-unit: ## Run unit tests only
composer test:unit
test-integration: ## Run integration tests (requires wp-env)
composer test:integration
## i18n
i18n: ## Generate .pot translation file
wp i18n make-pot . languages/polldaddy.pot
## WordPress environment
up: ## Start local WordPress environment
npx @wordpress/env start
down: ## Stop local WordPress environment
npx @wordpress/env stop
env-destroy: ## Destroy local WordPress environment
npx @wordpress/env destroy
## Build & Deploy
clean: ## Remove tmp/ directory
./build.sh $@
build: ## Clean and copy plugin files to tmp/build/
./build.sh $@
package: ## Build and create zip archive
./build.sh $@
deploy: ## Full release: merge develop → main, deploy to WordPress.org SVN
./build.sh $@
## Help
help: ## Show this help
@grep -E '^[a-zA-Z0-9_-]+:.*##' $(MAKEFILE_LIST) \
| awk -F ':.*## ' '{ printf " \033[36m%-18s\033[0m %s\n", $$1, $$2 }'
.PHONY: help install setup lint lint-fix test test-unit test-integration \
i18n up down env-destroy clean build package deploy