Skip to content

Commit b257485

Browse files
committed
feat: add nasm
1 parent 3b3d9b0 commit b257485

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

makefile

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,25 @@
22
REGISTRY ?= k90mirzaei/php
33
VERSION ?= latest
44

5-
CHANGED_DIRS = $(shell git diff --name-only HEAD~1 HEAD | grep '^fpm-alpine/' | cut -d '/' -f 2 | sort | uniq)
6-
75
all: build push
86

9-
build: ## Build only changed images
7+
build: ## Build all images
108
- @echo "Building..."
11-
- @for dir in $(CHANGED_DIRS); do \
12-
if [ -d ./fpm-alpine/$$dir ]; then \
13-
echo "Building image for version $$dir..."; \
14-
docker build ./fpm-alpine/$$dir -t $(REGISTRY):$$dir-$(VERSION); \
15-
fi \
9+
- @for dir in $(shell find ./fpm-alpine -mindepth 1 -maxdepth 1 -type d); do \
10+
version=$$(basename $$dir); \
11+
echo "Building image for version $$version..."; \
12+
docker build $$dir -t $(REGISTRY):$$version-$(VERSION); \
1613
done
1714

18-
push: ## Push only changed images to GitHub repo
15+
push: ## Push all images to github repo
1916
- @echo "Pushing..."
20-
- @for dir in $(CHANGED_DIRS); do \
21-
if [ -d ./fpm-alpine/$$dir ]; then \
22-
echo "Pushing image for version $$dir..."; \
23-
docker push $(REGISTRY):$$dir-$(VERSION); \
24-
fi \
17+
- @for dir in $(shell find ./fpm-alpine -mindepth 1 -maxdepth 1 -type d); do \
18+
version=$$(basename $$dir); \
19+
echo "Pushing image for version $$version..."; \
20+
docker push $(REGISTRY):$$version-$(VERSION); \
2521
done
2622

23+
2724
help: ## Show makefile helper
2825
- @printf '\e[1;33m%-6s\e[m' "Makefile available commands"
2926
- @echo ''

0 commit comments

Comments
 (0)