-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmakefile
More file actions
61 lines (47 loc) · 1.57 KB
/
makefile
File metadata and controls
61 lines (47 loc) · 1.57 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
setup.all:
bash ./install/setup.sh
setup.env:
bash ./install/setup-env.sh
docker.up:
docker-compose -p cf7t up -d
docker.down:
docker-compose -p cf7t down
docker.build.php:
docker-compose -p cf7t up -d --build php
git.wpc:
bash ./install/gitwpc.sh
clear.all:
bash ./install/clear.sh
npm.build:
docker-compose -p cf7t exec node bash -c "cd ./plugin-dir/react && npm run dev-build"
php.connect:
docker-compose -p cf7t exec php bash
php.connect.root:
docker-compose -p cf7t exec --user=root php bash
node.connect:
docker-compose -p cf7t exec node bash
node.connect.root:
docker-compose -p cf7t exec --user=root node bash
php.log:
docker-compose -p cf7t exec php sh -c 'tail -n 50 -f /var/log/php/error.log'
i18n.make.json:
ifeq ($(origin LOCALE), undefined)
@echo "❌ Specify the LOCALE variable. Example: make i18n.make.json LOCALE=ru_RU"
else
@docker-compose -p cf7t exec php sh -c '\
cd ./plugin-dir && \
echo "🔄 Updating localization files for locale: $(LOCALE)"; \
wp i18n make-json ./languages/cf7-telegram-$(LOCALE).po --no-purge && \
TARGET="./languages/cf7-telegram-$(LOCALE)-cf7-telegram-admin.json"; \
if [ -f "$$TARGET" ]; then \
echo "🗑 Removing previous version: $$TARGET"; \
rm "$$TARGET"; \
fi && \
JSON_FILE=$$(find ./languages -type f -name "cf7-telegram-$(LOCALE)-*.json" | grep -v "cf7-telegram-admin.json" | head -n 1); \
if [ -n "$$JSON_FILE" ]; then \
mv "$$JSON_FILE" "$$TARGET"; \
echo "✅ Renaming: $$JSON_FILE → $$TARGET"; \
else \
echo "❗ Source JSON file not found: cf7-telegram-$(LOCALE)-*.json"; \
fi'
endif