Skip to content

Commit c60392a

Browse files
committed
Fix makefile docker image related tags to use knwon cmds. Fixes #60
1 parent 09e6110 commit c60392a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ CMDS := $(shell find ./cmd/ -maxdepth 1 -type d -exec basename {} \; | grep
3131
BIN_CMDS := $(patsubst %, bin/%_$(GOOS)_$(GOARCH), $(CMDS))
3232
DOCKER_BIN_CMDS := $(patsubst %, $(HACK_DIR)/docker/%/%, $(CMDS))
3333

34+
DOCKER_IMAGES := mysql-operator mysql-helper
35+
3436
.DEFAULT_GOAL := bin/mysql-operator_$(GOOS)_$(GOARCH)
3537

3638
# Code building targets
@@ -82,14 +84,14 @@ clean:
8284
.PHONY: install-docker
8385
install-docker : $(patsubst %, bin/%_linux_amd64, $(CMDS))
8486
set -e;
85-
for cmd in $(CMDS); do \
87+
for cmd in $(DOCKER_IMAGES); do \
8688
install -m 755 bin/$${cmd}_linux_amd64 $(HACK_DIR)/docker/$${cmd}/$${cmd} ; \
8789
done
8890

8991
.PHONY: images
9092
images: install-docker
9193
set -e;
92-
for cmd in $(CMDS); do \
94+
for cmd in $(DOCKER_IMAGES); do \
9395
docker build \
9496
--build-arg VCS_REF=$(GIT_COMMIT) \
9597
--build-arg APP_VERSION=$(APP_VERSION) \
@@ -99,7 +101,7 @@ images: install-docker
99101

100102
publish: images
101103
set -e; \
102-
for cmd in $(CMDS); do \
104+
for cmd in $(DOCKER_IMAGES); do \
103105
for tag in $(IMAGE_TAGS); do \
104106
docker tag $(REGISTRY)/$${cmd}:$(BUILD_TAG) $(REGISTRY)/$${cmd}:$${tag}; \
105107
docker push $(REGISTRY)/$${cmd}:$${tag}; \

0 commit comments

Comments
 (0)