Skip to content

Commit cf93a27

Browse files
authored
Merge pull request #2774 from camilamacedo86/fix-maketarget
🐛 fix kustomize make file target which fails when called twice
2 parents ff80c6f + 863e347 commit cf93a27

File tree

12 files changed

+12
-12
lines changed

12 files changed

+12
-12
lines changed

docs/book/src/component-config-tutorial/testdata/project/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/k
120120
.PHONY: kustomize
121121
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
122122
$(KUSTOMIZE): $(LOCALBIN)
123-
curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN)
123+
test -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); }
124124

125125
.PHONY: controller-gen
126126
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.

docs/book/src/cronjob-tutorial/testdata/project/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/k
120120
.PHONY: kustomize
121121
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
122122
$(KUSTOMIZE): $(LOCALBIN)
123-
curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN)
123+
test -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); }
124124

125125
.PHONY: controller-gen
126126
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.

docs/book/src/migration/manually_migration_guide_v2_v3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/k
477477
.PHONY: kustomize
478478
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
479479
$(KUSTOMIZE): $(LOCALBIN)
480-
curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN)
480+
test -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); }
481481
482482
.PHONY: controller-gen
483483
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.

docs/book/src/multiversion-tutorial/testdata/project/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/k
120120
.PHONY: kustomize
121121
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
122122
$(KUSTOMIZE): $(LOCALBIN)
123-
curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN)
123+
test -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); }
124124

125125
.PHONY: controller-gen
126126
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.

pkg/plugins/golang/v2/scaffolds/internal/templates/makefile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/k
173173
.PHONY: kustomize
174174
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
175175
$(KUSTOMIZE): $(LOCALBIN)
176-
curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN)
176+
test -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); }
177177
178178
.PHONY: controller-gen
179179
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.

pkg/plugins/golang/v3/scaffolds/internal/templates/makefile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/k
179179
.PHONY: kustomize
180180
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
181181
$(KUSTOMIZE): $(LOCALBIN)
182-
curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN)
182+
test -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); }
183183
184184
.PHONY: controller-gen
185185
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.

testdata/project-v2/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/k
117117
.PHONY: kustomize
118118
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
119119
$(KUSTOMIZE): $(LOCALBIN)
120-
curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN)
120+
test -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); }
121121

122122
.PHONY: controller-gen
123123
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.

testdata/project-v3-addon/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/k
120120
.PHONY: kustomize
121121
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
122122
$(KUSTOMIZE): $(LOCALBIN)
123-
curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN)
123+
test -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); }
124124

125125
.PHONY: controller-gen
126126
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.

testdata/project-v3-config/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/k
120120
.PHONY: kustomize
121121
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
122122
$(KUSTOMIZE): $(LOCALBIN)
123-
curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN)
123+
test -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); }
124124

125125
.PHONY: controller-gen
126126
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.

testdata/project-v3-multigroup/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/k
120120
.PHONY: kustomize
121121
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
122122
$(KUSTOMIZE): $(LOCALBIN)
123-
curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN)
123+
test -s $(LOCALBIN)/kustomize || { curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); }
124124

125125
.PHONY: controller-gen
126126
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.

0 commit comments

Comments
 (0)