Skip to content

Commit 719e9a1

Browse files
VanillaSpoonopenshift-merge-robot
authored andcommitted
fix: allow for download of kustomize from the makefile
1 parent cc2a63c commit 719e9a1

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

Makefile

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,23 @@ controller-gen: ## Download controller-gen locally if necessary.
142142
KUSTOMIZE = $(shell pwd)/bin/kustomize
143143
.PHONY: kustomize
144144
kustomize: ## Download kustomize locally if necessary.
145-
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected])
145+
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected])
146146

147147
ENVTEST = $(shell pwd)/bin/setup-envtest
148148
.PHONY: envtest
149149
envtest: ## Download envtest-setup locally if necessary.
150150
$(call go-get-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest@latest)
151+
152+
# go-get-tool will 'go get' any package $2 and install it to $1.
153+
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
154+
define go-get-tool
155+
@[ -f $(1) ] || { \
156+
set -e ;\
157+
TMP_DIR=$$(mktemp -d) ;\
158+
cd $$TMP_DIR ;\
159+
go mod init tmp ;\
160+
echo "Downloading $(2)" ;\
161+
GOBIN=$(PROJECT_DIR)/bin go install $(2) ;\
162+
rm -rf $$TMP_DIR ;\
163+
}
164+
endef

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Key features:
2929
- To build locally : `make build`
3030
- To run locally : `make run`
3131
## Image creation
32-
- To build and release a docker image for controller : `make IMG=quay.io/project-codeflare/instascale:<TAG> docker-build docker-push`
32+
- To build and release a docker image for controller : `make IMG=quay.io/project-codeflare/instascale:<TAG> image-build image-push`
3333
- Note that the other contents of the Makefile (as well as the `config` and `bin` dirs) exist for future operator development, and are not currently utilized
3434
## Deployment
3535
- Deploy InstaScale using: `make deploy`

0 commit comments

Comments
 (0)