Skip to content

Commit

Permalink
Fix: Use go install instead of go get (#572)
Browse files Browse the repository at this point in the history
Update Kustomize version to v4.5.2 as the lower versiosn does not
support go install.
  • Loading branch information
Dharmjit Singh authored May 31, 2022
1 parent 1845295 commit 254a723
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ test-e2e: take-user-input docker-build prepare-byoh-docker-host-image $(GINKGO)
cluster-templates: kustomize cluster-templates-v1beta1

cluster-templates-e2e: kustomize
$(KUSTOMIZE) build $(BYOH_TEMPLATES)/v1beta1/templates/e2e --load_restrictor none > $(BYOH_TEMPLATES)/v1beta1/templates/e2e/cluster-template.yaml
$(KUSTOMIZE) build $(BYOH_TEMPLATES)/v1beta1/templates/e2e --load-restrictor LoadRestrictionsNone > $(BYOH_TEMPLATES)/v1beta1/templates/e2e/cluster-template.yaml

define WARNING
#####################################################################################################
Expand Down Expand Up @@ -166,8 +166,8 @@ take-user-input:


cluster-templates-v1beta1: kustomize ## Generate cluster templates for v1beta1
$(KUSTOMIZE) build $(BYOH_TEMPLATES)/v1beta1/templates/vm --load_restrictor none > $(BYOH_TEMPLATES)/v1beta1/templates/vm/cluster-template.yaml
$(KUSTOMIZE) build $(BYOH_TEMPLATES)/v1beta1/templates/docker --load_restrictor none > $(BYOH_TEMPLATES)/v1beta1/templates/docker/cluster-template.yaml
$(KUSTOMIZE) build $(BYOH_TEMPLATES)/v1beta1/templates/vm --load-restrictor LoadRestrictionsNone > $(BYOH_TEMPLATES)/v1beta1/templates/vm/cluster-template.yaml
$(KUSTOMIZE) build $(BYOH_TEMPLATES)/v1beta1/templates/docker --load-restrictor LoadRestrictionsNone > $(BYOH_TEMPLATES)/v1beta1/templates/docker/cluster-template.yaml

$(GINKGO): # Build ginkgo from tools folder.
cd $(TOOLS_DIR) && go build -tags=tools -o $(BIN_DIR)/ginkgo github.com/onsi/ginkgo/ginkgo
Expand Down Expand Up @@ -197,7 +197,7 @@ controller-gen: ## Download controller-gen locally if necessary.

KUSTOMIZE = $(shell pwd)/bin/kustomize
kustomize: ## Download kustomize locally if necessary.
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected])
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected])

host-agent-binaries: ## Builds the binaries for the host-agent
RELEASE_BINARY=./byoh-hostagent GOOS=linux GOARCH=amd64 GOLDFLAGS="$(LDFLAGS) $(STATIC)" \
Expand Down Expand Up @@ -249,7 +249,7 @@ TMP_DIR=$$(mktemp -d) ;\
cd $$TMP_DIR ;\
go mod init tmp ;\
echo "Downloading $(2)" ;\
GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\
GOBIN=$(PROJECT_DIR)/bin go install $(2) ;\
rm -rf $$TMP_DIR ;\
}
endef

0 comments on commit 254a723

Please sign in to comment.