diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index 87c0df10ef138..57989484ed787 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -468,8 +468,7 @@ EOF local go_version IFS=" " read -ra go_version <<< "$(GOFLAGS='' go version)" local minimum_go_version - # Temporarily build with 1.14 to simplify transition to 1.15 - minimum_go_version=go1.14.4 + minimum_go_version=go1.15.0 if [[ "${minimum_go_version}" != $(echo -e "${minimum_go_version}\n${go_version[2]}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) && "${go_version[2]}" != "devel" ]]; then kube::log::usage_from_stdin < /dev/null || exit 1 - curl -LO https://ftp.gnu.org/gnu/bash/bash-5.0.tar.gz - tar xf bash-5.0.tar.gz - pushd bash-5.0 > /dev/null || exit 1 - ./configure > configure.log - make > make.log - cp bash ../ - popd > /dev/null || exit 1 - popd > /dev/null || exit 1 - fi - path_with_bash="${recent_bash_path}:${path_with_bash}" - fi - echo "${path_with_bash}" -} -readonly -f os::deps::path_with_recent_bash - -# os::deps::protoc returns a path that includes protoc. -# -# Globals: -# None -# Arguments: -# None -# Returns: -# The path that includes protoc. -function os::deps::path_with_protoc() { - local path="${PATH}" - if ! which protoc &> /dev/null; then - local protoc_path="${TMPDIR:-/tmp}/protoc" - mkdir -p "${protoc_path}" - if [[ ! -f "${protoc_path}/bin/protoc" ]]; then - pushd "${protoc_path}" > /dev/null || exit 1 - curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.12.3/protoc-3.12.3-linux-x86_64.zip - unzip protoc-3.12.3-linux-x86_64.zip - popd > /dev/null || exit 1 - fi - path="${PATH}:${protoc_path}/bin" - fi - echo "${path}" -} -readonly -f os::deps::path_with_protoc - # os::deps::path_with_shellcheck returns a path that includes shellcheck. # # Globals: diff --git a/openshift-hack/test-go.sh b/openshift-hack/test-go.sh index 163002e10b451..30793e2b082df 100755 --- a/openshift-hack/test-go.sh +++ b/openshift-hack/test-go.sh @@ -3,14 +3,6 @@ # shellcheck source=openshift-hack/lib/init.sh source "$(dirname "${BASH_SOURCE[0]}")/lib/init.sh" -# Upstream testing requires recent bash (>= 4.3). If the system bash -# is not recent (e.g openshift ci and macos), download and compile a -# newer bash and make it available in the path. -PATH="$( os::deps::path_with_recent_bash )" -export PATH - -/usr/bin/env bash --version - ARTIFACTS="${ARTIFACTS:-/tmp/artifacts}" mkdir -p "${ARTIFACTS}" diff --git a/openshift-hack/test-integration.sh b/openshift-hack/test-integration.sh index 33f22258cc955..93c3ea902b099 100755 --- a/openshift-hack/test-integration.sh +++ b/openshift-hack/test-integration.sh @@ -3,13 +3,6 @@ # shellcheck source=openshift-hack/lib/init.sh source "$(dirname "${BASH_SOURCE[0]}")/lib/init.sh" -# Upstream testing requires recent bash (>= 4.3). If the system bash -# is not recent (e.g openshift ci and macos), download and compile a -# newer bash and make it available in the path. -PATH="$( os::deps::path_with_recent_bash )" - -/usr/bin/env bash --version - ./hack/install-etcd.sh PATH="${OS_ROOT}/third_party/etcd:${PATH}" diff --git a/openshift-hack/verify.sh b/openshift-hack/verify.sh index c8864a6bb9c62..9361e8f4faea9 100755 --- a/openshift-hack/verify.sh +++ b/openshift-hack/verify.sh @@ -3,19 +3,6 @@ # shellcheck source=openshift-hack/lib/init.sh source "$(dirname "${BASH_SOURCE[0]}")/lib/init.sh" -# Upstream verify requires recent bash (>= 4.3). If the system bash is -# not recent (e.g openshift ci and macos), download and compile a -# newer bash and make it available in the path. -PATH="$( os::deps::path_with_recent_bash )" - -/usr/bin/env bash --version - -# Upstream verify requires protoc (>= 3.0.0). If not present, download -# a recent version and make it available in the path. -PATH="$( os::deps::path_with_protoc )" - -/usr/bin/env protoc --version - # Required for openapi verification PATH="$(pwd)/third_party/etcd:${PATH}" diff --git a/openshift.spec b/openshift.spec index e5ebdfceb54c8..c6695f46fd98a 100644 --- a/openshift.spec +++ b/openshift.spec @@ -6,7 +6,7 @@ %global gopath %{_datadir}/gocode %global import_path k8s.io/kubernetes -%global golang_version 1.14 +%global golang_version 1.15 %{!?commit: # DO NOT MODIFY: the value on the line below is sed-like replaced by openshift/doozer