Skip to content

Commit 7135566

Browse files
committed
build: use /bin/sh intead of /bin/bash
- use /bin/sh intead of /bin/bash Signed-off-by: Hyung-Kyu Choi <[email protected]>
1 parent 2d170af commit 7135566

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

build/clean_go_build_cache.sh

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
1-
#!/bin/bash
1+
#!/bin/sh
22

33
function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; }
4-
function go_version {
5-
version=$(go version)
6-
echo $version
7-
regex="([0-9].[0-9]+.[0-9])"
8-
if [[ $version =~ $regex ]]; then
9-
echo ${BASH_REMATCH[1]}
10-
fi
11-
}
124

13-
golang_version=$(go_version)
5+
golang_version=$(go version |cut -d' ' -f3 |sed 's/go//')
146

157
# Clean go build cache when go version is greater than or equal to 1.10
168
if !(version_gt 1.10 $golang_version); then

0 commit comments

Comments
 (0)