mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-02-21 22:57:15 +00:00
Merge pull request #132197 from dims/support-building-k8s-using-go-tip-master
Build k8s using latest commit of golang
This commit is contained in:
@@ -524,6 +524,18 @@ kube::golang::internal::verify_go_version() {
|
||||
if [ "${GOTOOLCHAIN:-auto}" != 'auto' ]; then
|
||||
# no-op, just respect GOTOOLCHAIN
|
||||
:
|
||||
elif [ "${GO_VERSION:-}" == 'devel' ]; then
|
||||
# get the latest master version of Go, build and use that version
|
||||
export GOTOOLCHAIN='local'
|
||||
if [[ ! -f "${KUBE_ROOT}/.gimme/envs/gomaster.env" && ! -f "${HOME}/.gimme/envs/gomaster.env" ]]; then
|
||||
GOROOT_BOOTSTRAP="${GOROOT_BOOTSTRAP:-/usr/local/go}" "${KUBE_ROOT}/third_party/gimme/gimme" "master" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [[ -f "${KUBE_ROOT}/.gimme/envs/gomaster.env" ]]; then
|
||||
source "${KUBE_ROOT}/.gimme/envs/gomaster.env"
|
||||
elif [[ -f "${HOME}/.gimme/envs/gomaster.env" ]]; then
|
||||
source "${HOME}/.gimme/envs/gomaster.env"
|
||||
fi
|
||||
elif [ -n "${FORCE_HOST_GO:-}" ]; then
|
||||
# ensure existing host version is used, like before GOTOOLCHAIN existed
|
||||
export GOTOOLCHAIN='local'
|
||||
|
||||
6
third_party/gimme/gimme
vendored
6
third_party/gimme/gimme
vendored
@@ -314,8 +314,10 @@ _setup_bootstrap() {
|
||||
# _compile "dir"
|
||||
_compile() {
|
||||
(
|
||||
if grep -q GOROOT_BOOTSTRAP "${1}/src/make.bash" &>/dev/null; then
|
||||
_setup_bootstrap || return 1
|
||||
if [[ -z "${GOROOT_BOOTSTRAP}" ]]; then
|
||||
if grep -q GOROOT_BOOTSTRAP "${1}/src/make.bash" &>/dev/null; then
|
||||
_setup_bootstrap || return 1
|
||||
fi
|
||||
fi
|
||||
cd "${1}"
|
||||
if [[ -d .git ]]; then
|
||||
|
||||
Reference in New Issue
Block a user