Skip to content

Commit 0988cc3

Browse files
authored
add go.work to separate hack folder (#21061)
* add go work files since there hack mod uses root mod * add toolchain * change Makefile to run the updates using full path to use go.work file * add comment make file and move generate license above * add go-license to ignore to avoid making release commit dirty * force hack module to use older tablewriter lib * dont do gitignore
1 parent 6d92b22 commit 0988cc3

File tree

5 files changed

+261
-113
lines changed

5 files changed

+261
-113
lines changed

Makefile

Lines changed: 56 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,10 @@ compare: out/mkcmp out/minikube
10221022
out/mkcmp out/master.minikube out/$(CURRENT_GIT_BRANCH).minikube
10231023

10241024

1025+
.PHONY: generate-licenses
1026+
generate-licenses:
1027+
./hack/generate_licenses.sh
1028+
10251029
.PHONY: help
10261030
help:
10271031
@printf "\033[1mAvailable targets for minikube ${VERSION}\033[21m\n"
@@ -1032,28 +1036,23 @@ help:
10321036

10331037
.PHONY: update-golang-version
10341038
update-golang-version:
1035-
(cd hack/update/golang_version && \
1036-
go run update_golang_version.go)
1039+
go run hack/update/golang_version/update_golang_version.go
10371040

10381041
.PHONY: update-kubernetes-version
10391042
update-kubernetes-version:
1040-
@(cd hack/update/kubernetes_version && \
1041-
go run update_kubernetes_version.go)
1043+
go run hack/update/kubernetes_version/update_kubernetes_version.go
10421044

10431045
.PHONY: update-golint-version
10441046
update-golint-version:
1045-
(cd hack/update/golint_version && \
1046-
go run update_golint_version.go)
1047+
go run hack/update/golint_version/update_golint_version.go
10471048

10481049
.PHONY: update-preload-version
10491050
update-preload-version:
1050-
(cd hack/update/preload_version && \
1051-
go run update_preload_version.go)
1051+
go run hack/update/preload_version/update_preload_version.go
10521052

10531053
.PHONY: update-kubeadm-constants
10541054
update-kubeadm-constants:
1055-
(cd hack/update/kubeadm_constants && \
1056-
go run update_kubeadm_constants.go)
1055+
go run hack/update/kubeadm_constants/update_kubeadm_constants.go
10571056
gofmt -w pkg/minikube/constants/constants_kubeadm_images.go
10581057

10591058
.PHONY: stress
@@ -1074,219 +1073,173 @@ time-to-k8s-benchmark:
10741073

10751074
.PHONY: update-gopogh-version
10761075
update-gopogh-version: ## update gopogh version
1077-
(cd hack/update/gopogh_version && \
1078-
go run update_gopogh_version.go)
1076+
go run hack/update/gopogh_version/update_gopogh_version.go
10791077

10801078
.PHONY: update-gotestsum-version
10811079
update-gotestsum-version:
1082-
(cd hack/update/gotestsum_version && \
1083-
go run update_gotestsum_version.go)
1080+
go run hack/update/gotestsum_version/update_gotestsum_version.go
10841081

10851082
.PHONY: update-gh-version
10861083
update-gh-version:
1087-
(cd hack/update/gh_version && \
1088-
go run update_gh_version.go)
1084+
go run hack/update/gh_version/update_gh_version.go
10891085

10901086
.PHONY: update-docsy-version
10911087
update-docsy-version:
1092-
@(cd hack/update/docsy_version && \
1093-
go run update_docsy_version.go)
1088+
go run hack/update/docsy_version/update_docsy_version.go
10941089

10951090
.PHONY: update-hugo-version
10961091
update-hugo-version:
1097-
(cd hack/update/hugo_version && \
1098-
go run update_hugo_version.go)
1092+
go run hack/update/hugo_version/update_hugo_version.go
10991093

11001094
.PHONY: update-cloud-spanner-emulator-version
11011095
update-cloud-spanner-emulator-version:
1102-
(cd hack/update/cloud_spanner_emulator_version && \
1103-
go run update_cloud_spanner_emulator_version.go)
1096+
go run hack/update/cloud_spanner_emulator_version/update_cloud_spanner_emulator_version.go
11041097

11051098
.PHONY: update-containerd-version
11061099
update-containerd-version:
1107-
(cd hack/update/containerd_version && \
1108-
go run update_containerd_version.go)
1100+
go run hack/update/containerd_version/update_containerd_version.go
11091101

11101102
.PHONY: update-buildkit-version
11111103
update-buildkit-version:
1112-
(cd hack/update/buildkit_version && \
1113-
go run update_buildkit_version.go)
1104+
go run hack/update/buildkit_version/update_buildkit_version.go
11141105

11151106
.PHONY: update-cri-o-version
11161107
update-cri-o-version:
1117-
(cd hack/update/cri-o_version && \
1118-
go run update_cri-o_version.go)
1108+
go run hack/update/cri-o_version/update_cri-o_version.go
11191109

11201110
.PHONY: update-crun-version
11211111
update-crun-version:
1122-
(cd hack/update/crun_version && \
1123-
go run update_crun_version.go)
1112+
go run hack/update/crun_version/update_crun_version.go
11241113

11251114
.PHONY: update-metrics-server-version
11261115
update-metrics-server-version:
1127-
(cd hack/update/metrics_server_version && \
1128-
go run update_metrics_server_version.go)
1116+
go run hack/update/metrics_server_version/update_metrics_server_version.go
11291117

11301118
.PHONY: update-runc-version
11311119
update-runc-version:
1132-
(cd hack/update/runc_version && \
1133-
go run update_runc_version.go)
1120+
go run hack/update/runc_version/update_runc_version.go
11341121

11351122
.PHONY: update-docker-version
11361123
update-docker-version:
1137-
(cd hack/update/docker_version && \
1138-
go run update_docker_version.go)
1124+
go run hack/update/docker_version/update_docker_version.go
11391125

11401126
.PHONY: update-ubuntu-version
11411127
update-ubuntu-version:
1142-
(cd hack/update/ubuntu_version && \
1143-
go run update_ubuntu_version.go)
1128+
go run hack/update/ubuntu_version/update_ubuntu_version.go)
11441129

11451130
.PHONY: update-cni-plugins-version
11461131
update-cni-plugins-version:
1147-
(cd hack/update/cni_plugins_version && \
1148-
go run update_cni_plugins_version.go)
1132+
go run hack/update/cni_plugins_version/update_cni_plugins_version.go
11491133

11501134
.PHONY: update-gcp-auth-version
11511135
update-gcp-auth-version:
1152-
(cd hack/update/gcp_auth_version && \
1153-
go run update_gcp_auth_version.go)
1136+
go run hack/update/gcp_auth_version/update_gcp_auth_version.go
11541137

11551138
.PHONY: update-kubernetes-versions-list
11561139
update-kubernetes-versions-list:
1157-
(cd hack/update/kubernetes_versions_list && \
1158-
go run update_kubernetes_versions_list.go)
1140+
go run hack/update/kubernetes_versions_list/update_kubernetes_versions_list.go
11591141

11601142
.PHONY: update-ingress-version
11611143
update-ingress-version:
1162-
(cd hack/update/ingress_version && \
1163-
go run update_ingress_version.go)
1144+
go run hack/update/ingress_version/update_ingress_version.go
11641145

11651146
.PHONY: update-flannel-version
11661147
update-flannel-version:
1167-
(cd hack/update/flannel_version && \
1168-
go run update_flannel_version.go)
1148+
go run hack/update/flannel_version/update_flannel_version.go
11691149

11701150
.PHONY: update-inspektor-gadget-version
11711151
update-inspektor-gadget-version:
1172-
(cd hack/update/inspektor_gadget_version && \
1173-
go run update_inspektor_gadget_version.go)
1152+
go run hack/update/inspektor_gadget_version/update_inspektor_gadget_version.go
11741153

11751154
.PHONY: update-calico-version
11761155
update-calico-version:
1177-
(cd hack/update/calico_version && \
1178-
go run update_calico_version.go)
1156+
go run hack/update/calico_version/update_calico_version.go
11791157

11801158
.PHONY: update-cri-dockerd-version
11811159
update-cri-dockerd-version:
1182-
(cd hack/update/cri_dockerd_version && \
1183-
go run update_cri_dockerd_version.go)
1160+
go run hack/update/cri_dockerd_version/update_cri_dockerd_version.go
11841161

11851162
.PHONY: update-go-github-version
11861163
update-go-github-version:
1187-
(cd hack/update/go_github_version && \
1188-
go run update_go_github_version.go)
1164+
go run hack/update/go_github_version/update_go_github_version.go
11891165

11901166
.PHONY: update-docker-buildx-version
11911167
update-docker-buildx-version:
1192-
(cd hack/update/docker_buildx_version && \
1193-
go run update_docker_buildx_version.go)
1168+
go run hack/update/docker_buildx_version/update_docker_buildx_version.go
11941169

11951170
.PHONY: update-nerdctl-version
11961171
update-nerdctl-version:
1197-
(cd hack/update/nerdctl_version && \
1198-
go run update_nerdctl_version.go)
1172+
go run hack/update/nerdctl_version/update_nerdctl_version.go
11991173

12001174
.PHONY: update-crictl-version
12011175
update-crictl-version:
1202-
(cd hack/update/crictl_version && \
1203-
go run update_crictl_version.go)
1176+
go run hack/update/crictl_version/update_crictl_version.go
12041177

12051178
.PHONY: update-kindnetd-version
12061179
update-kindnetd-version:
1207-
(cd hack/update/kindnetd_version && \
1208-
go run update_kindnetd_version.go)
1180+
go run hack/update/kindnetd_version/update_kindnetd_version.go
12091181

12101182
.PHONY: update-istio-operator-version
12111183
update-istio-operator-version:
1212-
(cd hack/update/istio_operator_version && \
1213-
go run update_istio_operator_version.go)
1184+
go run hack/update/istio_operator_version/update_istio_operator_version.go
12141185

12151186
.PHONY: update-registry-version
12161187
update-registry-version:
1217-
(cd hack/update/registry_version && \
1218-
go run update_registry_version.go)
1188+
go run hack/update/registry_version/update_registry_version.go
12191189

12201190
.PHONY: update-volcano-version
12211191
update-volcano-version:
1222-
(cd hack/update/volcano_version && \
1223-
go run update_volcano_version.go)
1192+
go run hack/update/volcano_version/update_volcano_version.go
12241193

12251194
.PHONY: update-kong-version
12261195
update-kong-version:
1227-
(cd hack/update/kong_version && \
1228-
go run update_kong_version.go)
1196+
go run hack/update/kong_version/update_kong_version.go
12291197

12301198
.PHONY: update-kong-ingress-controller-version
12311199
update-kong-ingress-controller-version:
1232-
(cd hack/update/kong_ingress_controller_version && \
1233-
go run update_kong_ingress_controller_version.go)
1200+
go run hack/update/kong_ingress_controller_version/update_kong_ingress_controller_version.go
12341201

12351202
.PHONY: update-nvidia-device-plugin-version
12361203
update-nvidia-device-plugin-version:
1237-
(cd hack/update/nvidia_device_plugin_version && \
1238-
go run update_nvidia_device_plugin_version.go)
1204+
go run hack/update/nvidia_device_plugin_version/update_nvidia_device_plugin_version.go
12391205

12401206
.PHONY: update-amd-gpu-device-plugin-version
12411207
update-amd-gpu-device-plugin-version:
1242-
(cd hack/update/amd_device_plugin_version && \
1243-
go run update_amd_device_plugin_version.go)
1208+
go run hack/update/amd_device_plugin_version/update_amd_device_plugin_version.go
12441209

12451210
.PHONY: update-nerdctld-version
12461211
update-nerdctld-version:
1247-
(cd hack/update/nerdctld_version && \
1248-
go run update_nerdctld_version.go)
1212+
go run hack/update/nerdctld_version/update_nerdctld_version.go
12491213

12501214
.PHONY: update-kubectl-version
12511215
update-kubectl-version:
1252-
(cd hack/update/kubectl_version && \
1253-
go run update_kubectl_version.go)
1216+
go run hack/update/kubectl_version/update_kubectl_version.go
12541217

12551218
.PHONY: update-site-node-version
12561219
update-site-node-version:
1257-
(cd hack/update/site_node_version && \
1258-
go run update_site_node_version.go)
1220+
go run hack/update/site_node_version/update_site_node_version.go
12591221

12601222
.PHONY: update-cilium-version
12611223
update-cilium-version:
1262-
(cd hack/update/cilium_version && \
1263-
go run update_cilium_version.go)
1224+
go run hack/update/cilium_version/update_cilium_version.go
12641225

12651226
.PHONY: update-yakd-version
12661227
update-yakd-version:
1267-
(cd hack/update/yakd_version && \
1268-
go run update_yakd_version.go)
1228+
go run hack/update/yakd_version/update_yakd_version.go
12691229

12701230
.PHONY: update-kube-registry-proxy-version
12711231
update-kube-registry-proxy-version:
1272-
(cd hack/update/kube_registry_proxy_version && \
1273-
go run update_kube_registry_proxy_version.go)
1232+
go run hack/update/kube_registry_proxy_version/update_kube_registry_proxy_version.go
12741233

12751234
.PHONY: update-headlamp-version
12761235
update-headlamp-version:
1277-
(cd hack/update/headlamp_version && \
1278-
go run update_headlamp_version.go)
1279-
1280-
.PHONY: get-dependency-verison
1281-
get-dependency-version:
1282-
@(cd hack/update/get_version && \
1283-
go run get_version.go)
1284-
1285-
.PHONY: generate-licenses
1286-
generate-licenses:
1287-
./hack/generate_licenses.sh
1236+
go run hack/update/headlamp_version/update_headlamp_version.go
12881237

12891238
.PHONY: update-kube-vip-version
12901239
update-kube-vip-version:
1291-
(cd hack/update/kube_vip_version && \
1292-
go run update_kube_vip_version.go)
1240+
go run hack/update/kube_vip_version/update_kube_vip_version.go
1241+
1242+
# used by update- Targets to get before/after versions of tools it updates
1243+
.PHONY: get-dependency-verison
1244+
get-dependency-version:
1245+
go run hack/update/get_version/get_version.go

go.work

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
go 1.24.0
2+
3+
use (
4+
.
5+
./hack
6+
)

0 commit comments

Comments
 (0)