-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (36 loc) · 1016 Bytes
/
Makefile
File metadata and controls
40 lines (36 loc) · 1016 Bytes
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
# Static list of all lib directories
LIBS = \
libs/amazon-linux-2-v74 \
libs/amazon-linux-2-v80 \
libs/amazon-linux-2-v81 \
libs/amazon-linux-2-v82 \
libs/amazon-linux-2-v83 \
libs/amazon-linux-2023-v84 \
libs/almalinux-9-v85
# Rebuild all libs by running make build dist in each directory
.PHONY: rebuild
rebuild:
@for dir in $(LIBS); do \
echo "Rebuilding $$(basename $$dir)..."; \
(cd $$dir && $(MAKE) build dist) || echo "Failed to rebuild $$(basename $$dir)"; \
done
# Force add and commit all libs with pattern "[vXX] rebuild php"
.PHONY: rebuild-track
rebuild-track:
@for dir in $(LIBS); do \
dir_name=$$(basename $$dir); \
version=$$(echo "$$dir_name" | sed -E 's/.*-v([0-9]+)$$/v\1/'); \
if [ -n "$$version" ]; then \
echo "Processing $$dir_name ($$version)..."; \
git add -f $$dir/native; \
git commit -m "[$$version] rebuild php" || true; \
fi; \
done
# Run build in all libs
.PHONY: build
build:
npm run build
# Run tests in all libs
.PHONY: test
test:
npm run test