-
Notifications
You must be signed in to change notification settings - Fork 45
Makefile: Move Go tools into tools module #407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,7 +45,6 @@ require ( | |
| ) | ||
|
|
||
| require ( | ||
| al.essio.dev/pkg/shellescape v1.5.1 // indirect | ||
| cel.dev/expr v0.24.0 // indirect | ||
| cloud.google.com/go v0.121.2 // indirect | ||
| cloud.google.com/go/auth v0.16.5 // indirect | ||
|
|
@@ -68,7 +67,6 @@ require ( | |
| github.com/atotto/clipboard v0.1.4 // indirect | ||
| github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect | ||
| github.com/beorn7/perks v1.0.1 // indirect | ||
| github.com/bitfield/gotestdox v0.2.2 // indirect | ||
| github.com/bombsimon/logrusr/v2 v2.0.1 // indirect | ||
| github.com/bradleyfalzon/ghinstallation/v2 v2.8.0 // indirect | ||
| github.com/caarlos0/env/v6 v6.10.0 // indirect | ||
|
|
@@ -89,7 +87,6 @@ require ( | |
| github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect | ||
| github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect | ||
| github.com/distribution/reference v0.6.0 // indirect | ||
| github.com/dnephin/pflag v1.0.7 // indirect | ||
| github.com/docker/cli v28.2.2+incompatible // indirect | ||
| github.com/docker/distribution v2.8.3+incompatible // indirect | ||
| github.com/docker/docker-credential-helpers v0.9.3 // indirect | ||
|
|
@@ -105,7 +102,6 @@ require ( | |
| github.com/fatih/color v1.18.0 // indirect | ||
| github.com/felixge/httpsnoop v1.0.4 // indirect | ||
| github.com/frankban/quicktest v1.14.6 // indirect | ||
| github.com/fsnotify/fsnotify v1.9.0 // indirect | ||
| github.com/fxamacker/cbor/v2 v2.9.0 // indirect | ||
| github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect | ||
| github.com/go-git/go-billy/v5 v5.5.0 // indirect | ||
|
|
@@ -130,7 +126,6 @@ require ( | |
| github.com/google/jsonschema-go v0.4.2 // indirect | ||
| github.com/google/osv-scanner v1.4.1 // indirect | ||
| github.com/google/s2a-go v0.1.9 // indirect | ||
| github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect | ||
| github.com/google/uuid v1.6.0 // indirect | ||
| github.com/google/wire v0.5.0 // indirect | ||
| github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect | ||
|
|
@@ -178,7 +173,6 @@ require ( | |
| github.com/opencontainers/image-spec v1.1.1 // indirect | ||
| github.com/owenrumney/go-sarif/v2 v2.2.2 // indirect | ||
| github.com/package-url/packageurl-go v0.1.1 // indirect | ||
| github.com/pelletier/go-toml v1.9.5 // indirect | ||
| github.com/pjbgf/sha1cd v0.3.0 // indirect | ||
| github.com/pkg/errors v0.9.1 // indirect | ||
| github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect | ||
|
|
@@ -241,19 +235,13 @@ require ( | |
| gopkg.in/inf.v0 v0.9.1 // indirect | ||
| gopkg.in/warnings.v0 v0.1.2 // indirect | ||
| gopkg.in/yaml.v2 v2.4.0 // indirect | ||
| gotest.tools/gotestsum v1.13.0 // indirect | ||
| gotest.tools/v3 v3.5.2 // indirect | ||
| k8s.io/klog/v2 v2.130.1 // indirect | ||
| k8s.io/kube-openapi v0.0.0-20251125145642-4e65d59e963e // indirect | ||
| mvdan.cc/sh/v3 v3.7.0 // indirect | ||
| sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect | ||
| sigs.k8s.io/kind v0.31.0 // indirect | ||
| sigs.k8s.io/randfill v1.0.0 // indirect | ||
| sigs.k8s.io/release-utils v0.6.0 // indirect | ||
| sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect | ||
| sigs.k8s.io/yaml v1.6.0 // indirect | ||
| ) | ||
|
Comment on lines
+238
to
247
|
||
|
|
||
| tool ( | ||
| gotest.tools/gotestsum | ||
| sigs.k8s.io/kind | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,9 +4,13 @@ set -o errexit | |
| set -o pipefail | ||
|
|
||
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)" | ||
|
|
||
| # Use kind via go tool directives (go.mod) so no separate install step is needed. | ||
| KIND=(go tool kind) | ||
| # Use kind via go tool directives (tools/go.mod) so no separate install step is needed. | ||
| # Override KIND to use a different binary or command. | ||
| TOOLS_MODFILE="${TOOLS_MODFILE:-${REPO_ROOT}/tools/go.mod}" | ||
| KIND="${KIND:-go tool -modfile=${TOOLS_MODFILE} kind}" | ||
| read -r -a KIND_TOOL <<<"${KIND}" | ||
|
Comment on lines
+9
to
+13
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: AI generated, but this should be improved. |
||
|
|
||
| KIND_CLUSTER_NAME=${KIND_CLUSTER_NAME:-agentregistry} | ||
| KIND_IMAGE_VERSION=${KIND_IMAGE_VERSION:-1.34.0} | ||
|
|
@@ -50,7 +54,7 @@ if [ "$(uname -s)" = "Linux" ]; then | |
| "${TMP_CONFIG}" | ||
| fi | ||
|
|
||
| "${KIND[@]}" create cluster --name "${KIND_CLUSTER_NAME}" \ | ||
| "${KIND_TOOL[@]}" create cluster --name "${KIND_CLUSTER_NAME}" \ | ||
| --config "${TMP_CONFIG}" \ | ||
| --image="kindest/node:v${KIND_IMAGE_VERSION}" | ||
|
|
||
|
|
@@ -85,7 +89,7 @@ fi | |
| # We want a consistent name that works from both ends, so we tell containerd to | ||
| # alias localhost:${REG_PORT} to the registry container when pulling images | ||
| REGISTRY_DIR="/etc/containerd/certs.d/localhost:${REG_PORT}" | ||
| for node in $("${KIND[@]}" get nodes --name "${KIND_CLUSTER_NAME}"); do | ||
| for node in $("${KIND_TOOL[@]}" get nodes --name "${KIND_CLUSTER_NAME}"); do | ||
| docker exec "${node}" mkdir -p "${REGISTRY_DIR}" | ||
| cat <<EOF | docker exec -i "${node}" cp /dev/stdin "${REGISTRY_DIR}/hosts.toml" | ||
| [host."http://${REG_NAME}:5000"] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Override the arg variable since --fix is enabled by default