Skip to content

Commit 9665cda

Browse files
committed
build: fix build error on ubuntu
1 parent 1fabc48 commit 9665cda

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

build

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@ eval $(go env)
1313

1414
GIT_SHA=`git rev-parse --short HEAD || echo "GitNotFound"`
1515

16-
IFS=' ' read -a ver <<< "$(go version)"
17-
IFS='.' read -a ver <<< ${ver[2]}
18-
IFS=' ' read -a ver <<< ${ver}
19-
if [[ ver[1] -gt 4 ]]; then
16+
val=$(go version)
17+
ver=$(echo $val | awk -F ' ' '{print $3}' | awk -F '.' '{print $2}')
18+
if [ $ver -gt 4 ]; then
2019
LINK_OPERATOR="="
21-
else
20+
else
2221
LINK_OPERATOR=" "
2322
fi
2423

0 commit comments

Comments
 (0)