Browse code

Remove unused toml validation

Signed-off-by: Derek McGowan <derek@mcg.dev>

Derek McGowan authored on 2025/03/06 18:37:11
Showing 3 changed files
... ...
@@ -170,19 +170,6 @@ EOT
170 170
 FROM binary-dummy AS delve-unsupported
171 171
 FROM delve-${DELVE_SUPPORTED} AS delve
172 172
 
173
-FROM base AS tomll
174
-# GOTOML_VERSION specifies the version of the tomll binary to build and install
175
-# from the https://github.com/pelletier/go-toml repository. This binary is used
176
-# in CI in the hack/validate/toml script.
177
-#
178
-# When updating this version, consider updating the github.com/pelletier/go-toml
179
-# dependency in vendor.mod accordingly.
180
-ARG GOTOML_VERSION=v1.8.1
181
-RUN --mount=type=cache,target=/root/.cache/go-build \
182
-    --mount=type=cache,target=/go/pkg/mod \
183
-        GOBIN=/build/ GO111MODULE=on go install "github.com/pelletier/go-toml/cmd/tomll@${GOTOML_VERSION}" \
184
-     && /build/tomll --help
185
-
186 173
 FROM base AS gowinres
187 174
 # GOWINRES_VERSION defines go-winres tool version
188 175
 ARG GOWINRES_VERSION=v0.3.1
... ...
@@ -461,7 +448,6 @@ FROM base AS dev-systemd-false
461 461
 COPY --link --from=frozen-images /build/ /docker-frozen-images
462 462
 COPY --link --from=swagger       /build/ /usr/local/bin/
463 463
 COPY --link --from=delve         /build/ /usr/local/bin/
464
-COPY --link --from=tomll         /build/ /usr/local/bin/
465 464
 COPY --link --from=gowinres      /build/ /usr/local/bin/
466 465
 COPY --link --from=tini          /build/ /usr/local/bin/
467 466
 COPY --link --from=registry      /build/ /usr/local/bin/
... ...
@@ -11,7 +11,6 @@ SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
11 11
 . "${SCRIPTDIR}"/yamllint
12 12
 . "${SCRIPTDIR}"/swagger
13 13
 . "${SCRIPTDIR}"/swagger-gen
14
-. "${SCRIPTDIR}"/toml
15 14
 . "${SCRIPTDIR}"/deprecate-integration-cli
16 15
 . "${SCRIPTDIR}"/golangci-lint
17 16
 . "${SCRIPTDIR}"/shfmt
18 17
deleted file mode 100755
... ...
@@ -1,31 +0,0 @@
1
-#!/usr/bin/env bash
2
-
3
-SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4
-source "${SCRIPTDIR}/.validate"
5
-
6
-IFS=$'\n'
7
-files=($(validate_diff --diff-filter=ACMR --name-only -- 'MAINTAINERS' || true))
8
-unset IFS
9
-
10
-badFiles=()
11
-for f in "${files[@]}"; do
12
-	# we use "git show" here to validate that what's committed has valid TOML syntax
13
-	if ! git show "$VALIDATE_HEAD:$f" | tomll /proc/self/fd/0; then
14
-		badFiles+=("$f")
15
-	fi
16
-done
17
-
18
-if [ ${#badFiles[@]} -eq 0 ]; then
19
-	echo 'Congratulations!  All TOML source files changed here have valid syntax.'
20
-else
21
-	{
22
-		echo "These files are not valid TOML:"
23
-		for f in "${badFiles[@]}"; do
24
-			echo " - $f"
25
-		done
26
-		echo
27
-		echo 'Please reformat the above files as valid TOML'
28
-		echo
29
-	} >&2
30
-	false
31
-fi