@@ -24,6 +24,18 @@ set -eu
24
24
# -s --skip-installed : Skip anything that's already installed
25
25
#
26
26
27
+ #
28
+ # This file includes documentation in lines prefixed `#doc#`.
29
+ # These lines are extracted by running `task doc:dependencies` from the root folder.
30
+ #
31
+ # Each depencency should be documented by a single line with the following content:
32
+ #
33
+ # | <name> | <version> | <details> |
34
+ #
35
+ # Details should include at minimum a link to the originating website.
36
+ # Be sure to use include the `#doc#` prefix on each line.
37
+ #
38
+
27
39
VERBOSE=false
28
40
SKIP=false
29
41
DEVCONTAINER=false
82
94
83
95
# Ensure we have the right version of GO
84
96
97
+ # doc# | Go | 1.20 | https://golang.org/doc/install #
85
98
if ! command -v go > /dev/null 2>&1 ; then
86
99
write-error " Go must be installed manually; see https://golang.org/doc/install"
87
100
exit 1
@@ -91,14 +104,15 @@ GOVER=$(go version)
91
104
write-info " Go version: ${GOVER[*]} "
92
105
93
106
GOVERREQUIRED=" go1.20.*"
94
- GOVERACTUAL=$( go version | { read _ _ ver _; echo $ver ; })
107
+ GOVERACTUAL=$( go version | { read _ _ ver _; echo " $ver " ; })
95
108
if ! [[ " $GOVERACTUAL " =~ $GOVERREQUIRED ]]; then
96
109
write-error " Go must be version $GOVERREQUIRED , not $GOVERACTUAL ; see : https://golang.org/doc/install"
97
110
exit 1
98
111
fi
99
112
100
113
# Ensure we have AZ
101
114
115
+ # doc# | AZ | latest | https://docs.microsoft.com/en-us/cli/azure/install-azure-cli |
102
116
if ! command -v az > /dev/null 2>&1 ; then
103
117
write-error " Azure CLI must be installed manually: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli"
104
118
exit 1
@@ -145,25 +159,39 @@ go-install() {
145
159
fi
146
160
}
147
161
162
+ # doc# | conversion-gen | v0.28.0 | https://pkg.go.dev/k8s.io/code-generator/cmd/conversion-gen |
148
163
go-install conversion-gen k8s.io/code-generator/cmd/
[email protected]
164
+
165
+ # doc# | controller-gen | v0.13.0 | https://book.kubebuilder.io/reference/controller-gen |
149
166
go-install controller-gen sigs.k8s.io/controller-tools/cmd/
[email protected]
167
+
168
+ # doc# | kind | v0.20.0 | https://kind.sigs.k8s.io/ |
150
169
go-install kind sigs.k8s.io/
[email protected]
170
+
171
+ # doc# | kustomize | v4.5.7 | https://kustomize.io/ |
151
172
go-install kustomize sigs.k8s.io/kustomize/kustomize/
[email protected]
152
173
153
174
# for docs site
175
+
176
+ # doc# | hugo | v0.88.1 | https://gohugo.io/ |
154
177
go-install hugo -tags extended github.com/gohugoio/
[email protected]
178
+
179
+ # doc# | htmltest | latest | https://github.com/wjdp/htmltest (but see https://github.com/theunrepentantgeek/htmltest for our custom build )
155
180
# Restore this to github.com/wjdp/htmltest@v?? once PR#215 is merged with the feature we need
156
181
go-install htmltest github.com/theunrepentantgeek/htmltest@latest
157
182
158
183
# for api docs
159
184
# TODO: Replace this with the new release tag.
160
185
# Currently pinned just after a couple of fixes from @theunrepentantgeek
186
+ # doc# | gen-crd-api-reference-docs | 11fe95cb | https://github.com/ahmetb/gen-crd-api-reference-docs |
161
187
go-install gen-crd-api-reference-docs github.com/ahmetb/gen-crd-api-reference-docs@11fe95cbdcb91e9c25446fc99e6f2cdd8cbeb91a
162
188
163
189
# Install envtest tooling - ideally version here should match that used in v2/go.mod, but only @latest works
190
+ # doc# | setup-envtest | latest | https://book.kubebuilder.io/reference/envtest.html |
164
191
go-install setup-envtest sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
165
192
166
193
# Install golangci-lint
194
+ # doc# | golangci-lint | 1.51.2 | https://github.com/golangci/golangci-lint |
167
195
write-verbose " Checking for $TOOL_DEST /golangci-lint"
168
196
if should-install " $TOOL_DEST /golangci-lint" ; then
169
197
write-info " Installing golangci-lint"
@@ -173,27 +201,31 @@ if should-install "$TOOL_DEST/golangci-lint"; then
173
201
fi
174
202
175
203
# Install Task
204
+ # doc# | Task | v3.31 | https://taskfile.dev/ |
176
205
write-verbose " Checking for $TOOL_DEST /go-task"
177
206
if should-install " $TOOL_DEST /task" ; then
178
207
write-info " Installing go-task"
179
208
curl -sL " https://github.com/go-task/task/releases/download/v3.31.0/task_linux_amd64.tar.gz" | tar xz -C " $TOOL_DEST " task
180
209
fi
181
210
182
211
# Install Trivy
212
+ # doc# | Trivy | v0.37.3 | https://trivy.dev/ |
183
213
write-verbose " Checking for $TOOL_DEST /trivy"
184
214
if should-install " $TOOL_DEST /trivy" ; then
185
215
write-info " Installing trivy"
186
216
curl -sL " https://github.com/aquasecurity/trivy/releases/download/v0.37.3/trivy_0.37.3_Linux-64bit.tar.gz" | tar xz -C " $TOOL_DEST " trivy
187
217
fi
188
218
189
219
# Install helm
220
+ # doc# | Helm | v3.8.0 | https://helm.sh/ |
190
221
write-verbose " Checking for $TOOL_DEST /helm"
191
222
if should-install " $TOOL_DEST /helm" ; then
192
223
write-info " Installing helm…"
193
224
curl -sL " https://get.helm.sh/helm-v3.8.0-linux-amd64.tar.gz" | tar -C " $TOOL_DEST " --strip-components=1 -xz linux-amd64/helm
194
225
fi
195
226
196
227
# Install yq
228
+ # doc# | YQ | v4.13.0 | https://github.com/mikefarah/yq/ |
197
229
yq_version=v4.13.0
198
230
yq_binary=yq_linux_amd64
199
231
write-verbose " Checking for $TOOL_DEST /yq"
@@ -204,6 +236,7 @@ if should-install "$TOOL_DEST/yq"; then
204
236
fi
205
237
206
238
# Install cmctl, used to wait for cert manager installation during some tests cases
239
+ # doc# | cmctl | latest | https://cert-manager.io/docs/reference/cmctl |
207
240
os=$( go env GOOS)
208
241
arch=$( go env GOARCH)
209
242
write-verbose " Checking for $TOOL_DEST /cmctl"
@@ -213,6 +246,7 @@ if should-install "$TOOL_DEST/cmctl"; then
213
246
fi
214
247
215
248
write-verbose " Checking for $BUILDX_DEST /docker-buildx"
249
+ # doc# | BuildX | v0.11.2 | https://github.com/docker/buildx |
216
250
if should-install " $BUILDX_DEST /docker-buildx" ; then
217
251
write-info " Installing buildx-${os} _${arch} to $BUILDX_DEST …"
218
252
mkdir -p " $BUILDX_DEST "
@@ -221,13 +255,15 @@ if should-install "$BUILDX_DEST/docker-buildx"; then
221
255
fi
222
256
223
257
# Install azwi
258
+ # doc# | AZWI | v1.0.0 | https://github.com/Azure/azure-workload-identity |
224
259
write-verbose " Checking for $TOOL_DEST /azwi"
225
260
if should-install " $TOOL_DEST /azwi" ; then
226
261
write-info " Installing azwi…"
227
262
curl -sL " https://github.com/Azure/azure-workload-identity/releases/download/v1.0.0/azwi-v1.0.0-${os} -${arch} .tar.gz" | tar xz -C " $TOOL_DEST " azwi
228
263
fi
229
264
230
265
# Ensure tooling for Hugo is available
266
+ # doc# | PostCSS | latest | https://postcss.org/ |
231
267
write-verbose " Checking for /usr/bin/postcss"
232
268
if ! which postcss > /dev/null 2>&1 ; then
233
269
write-info " Installing postcss"
0 commit comments