diff options
| author | fisherxu <xufei40@huawei.com> | 2022-01-13 19:28:55 +0800 |
|---|---|---|
| committer | fisherxu <xufei40@huawei.com> | 2022-01-17 18:13:24 +0800 |
| commit | 97a52cdb3070b9f02a74bc0992c543923af0dda0 (patch) | |
| tree | 23fecd7d1706d81d7ee80d3fab82ff6d91d72c26 /hack/lib/install.sh | |
| parent | Merge pull request #3467 from gy95/release (diff) | |
| download | kubeedge-97a52cdb3070b9f02a74bc0992c543923af0dda0.tar.gz | |
verify go version when call build.sh script
Signed-off-by: fisherxu <xufei40@huawei.com>
Diffstat (limited to 'hack/lib/install.sh')
| -rwxr-xr-x | hack/lib/install.sh | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/hack/lib/install.sh b/hack/lib/install.sh index 1861f887e..81baa4238 100755 --- a/hack/lib/install.sh +++ b/hack/lib/install.sh @@ -77,25 +77,6 @@ function install_golangci-lint { export PATH=$PATH:$GOPATH/bin } -verify_go_version(){ - if [[ -z "$(command -v go)" ]]; then - echo "Can't find 'go' in PATH, please fix and retry. -See http://golang.org/doc/install for installation instructions." - exit 1 - fi - - local go_version - IFS=" " read -ra go_version <<< "$(go version)" - local minimum_go_version - minimum_go_version=go1.12.1 - 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 - echo "Detected go version: ${go_version[*]}. -Kubernetes requires ${minimum_go_version} or greater. -Please install ${minimum_go_version} or later." - exit 1 - fi -} - verify_docker_installed(){ # verify the docker installed command -v docker >/dev/null || { |
