Skip to content

Commit

Permalink
ci: fix stale GOROOT used by client-gen (#687)
Browse files Browse the repository at this point in the history
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
  • Loading branch information
spacewander committed Aug 20, 2024
1 parent 667f07d commit 3b522bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/gen-crd-code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ readonly COMMON_FLAGS="${VERIFY_FLAG:-} --go-header-file ${SCRIPT_ROOT}/hack/boi

echo "Generating clientset at ${OUTPUT_PKG}/${CLIENTSET_PKG_NAME}"
# Increase the `-v n` to have verbose log if this cmd failed.
# We pass the `GOROOT` env so that the client-go will use the latest GOROOT, not the (stale) GOROOT
# that the `client-gen` binary was built with.
#
# shellcheck disable=SC2086
cd "${SCRIPT_ROOT}" && "${LOCALBIN}"/client-gen \
cd "${SCRIPT_ROOT}" && GOROOT=$(go env GOROOT) "${LOCALBIN}"/client-gen \
--clientset-name "${CLIENTSET_NAME}" \
--input-base "" \
--input "${APIS_PKG}/apis/v1" \
Expand Down

0 comments on commit 3b522bf

Please sign in to comment.