bazel: use go_bin_for_host for all scripts (#3147)

This commit is contained in:
Markus Rudy 2024-06-05 14:35:10 +02:00 committed by GitHub
parent 68035cd90b
commit 2fbbf02516
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -57,10 +57,10 @@ sh_template(
sh_template( sh_template(
name = "go_mod_tidy", name = "go_mod_tidy",
data = [ data = [
"@io_bazel_rules_go//go", ":go_bin_for_host",
], ],
substitutions = { substitutions = {
"@@GO@@": "$(rootpath @io_bazel_rules_go//go)", "@@GO@@": "$(rootpath :go_bin_for_host)",
}, },
template = "go_tidy.sh.in", template = "go_tidy.sh.in",
) )
@ -234,10 +234,10 @@ sh_template(
name = "golangci_lint", name = "golangci_lint",
data = [ data = [
":com_github_golangci_golangci_lint", ":com_github_golangci_golangci_lint",
"@io_bazel_rules_go//go", ":go_bin_for_host",
], ],
substitutions = { substitutions = {
"@@GO@@": "$(rootpath @io_bazel_rules_go//go)", "@@GO@@": "$(rootpath :go_bin_for_host)",
"@@GOLANGCI-LINT@@": "$(rootpath :com_github_golangci_golangci_lint)", "@@GOLANGCI-LINT@@": "$(rootpath :com_github_golangci_golangci_lint)",
}, },
template = "golangci_lint.sh.in", template = "golangci_lint.sh.in",
@ -267,11 +267,11 @@ sh_template(
sh_template( sh_template(
name = "golicenses_check", name = "golicenses_check",
data = [ data = [
":go_bin_for_host",
"@com_github_google_go_licenses//:go-licenses", "@com_github_google_go_licenses//:go-licenses",
"@io_bazel_rules_go//go",
], ],
substitutions = { substitutions = {
"@@GO@@": "$(rootpath @io_bazel_rules_go//go)", "@@GO@@": "$(rootpath :go_bin_for_host)",
"@@GO_LICENSES@@": "$(rootpath @com_github_google_go_licenses//:go-licenses)", "@@GO_LICENSES@@": "$(rootpath @com_github_google_go_licenses//:go-licenses)",
}, },
template = "golicenses.sh.in", template = "golicenses.sh.in",
@ -287,11 +287,11 @@ sh_template(
sh_template( sh_template(
name = "govulncheck", name = "govulncheck",
data = [ data = [
"@io_bazel_rules_go//go", ":go_bin_for_host",
"@org_golang_x_vuln//cmd/govulncheck", "@org_golang_x_vuln//cmd/govulncheck",
], ],
substitutions = { substitutions = {
"@@GO@@": "$(rootpath @io_bazel_rules_go//go)", "@@GO@@": "$(rootpath :go_bin_for_host)",
"@@GOVULNCHECK@@": "$(rootpath @org_golang_x_vuln//cmd/govulncheck:govulncheck)", "@@GOVULNCHECK@@": "$(rootpath @org_golang_x_vuln//cmd/govulncheck:govulncheck)",
}, },
template = "govulncheck.sh.in", template = "govulncheck.sh.in",
@ -322,15 +322,15 @@ sh_template(
data = [ data = [
":com_github_helm_helm", ":com_github_helm_helm",
":com_github_siderolabs_talos_hack_docgen", ":com_github_siderolabs_talos_hack_docgen",
":go_bin_for_host",
"//internal/attestation/measurements/measurement-generator", "//internal/attestation/measurements/measurement-generator",
"//internal/versions/hash-generator", "//internal/versions/hash-generator",
"@io_bazel_rules_go//go",
"@org_golang_x_tools//cmd/stringer", "@org_golang_x_tools//cmd/stringer",
"@yq_toolchains//:resolved_toolchain", "@yq_toolchains//:resolved_toolchain",
], ],
substitutions = { substitutions = {
"@@DOCGEN@@": "$(rootpath :com_github_siderolabs_talos_hack_docgen)", "@@DOCGEN@@": "$(rootpath :com_github_siderolabs_talos_hack_docgen)",
"@@GO@@": "$(rootpath @io_bazel_rules_go//go)", "@@GO@@": "$(rootpath :go_bin_for_host)",
"@@HASH_GENERATOR@@": "$(rootpath //internal/versions/hash-generator:hash-generator)", "@@HASH_GENERATOR@@": "$(rootpath //internal/versions/hash-generator:hash-generator)",
"@@HELM@@": "$(rootpath :com_github_helm_helm)", "@@HELM@@": "$(rootpath :com_github_helm_helm)",
"@@MEASUREMENT_GENERATOR@@": "$(rootpath //internal/attestation/measurements/measurement-generator:measurement-generator)", "@@MEASUREMENT_GENERATOR@@": "$(rootpath //internal/attestation/measurements/measurement-generator:measurement-generator)",