Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve version checks for ci script #3047

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/build_and_test.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,42 @@ for file in `find . -name go.mod`; do
continue 1
fi

# package kuhecm needs golang >= v1.18
# package kuhecm needs golang >= v1.19
if [ "kubecm" = $(basename $dirpath) ]; then
continue 1
if ! go version|grep -q "1.19"; then
if ! go version|grep -qE "go1.19|go1.[2-9][0-9]"; then
echo "ignore kubecm as go version: $(go version)"
continue 1
fi
fi

# package etcd needs golang >= v1.19
if [ "etcd" = $(basename $dirpath) ]; then
if ! go version|grep -q "1.19"; then
if ! go version|grep -qE "go1.19|go1.[2-9][0-9]"; then
echo "ignore etcd as go version: $(go version)"
continue 1
fi
fi

# package example needs golang >= v1.19
# package example needs golang >= v1.20
if [ "example" = $(basename $dirpath) ]; then
if ! go version|grep -q "1.20"; then
if ! go version|grep -qE "go1.[2-9][0-9]"; then
echo "ignore example as go version: $(go version)"
continue 1
fi
fi

# package otlpgrpc needs golang >= v1.20
if [ "otlpgrpc" = $(basename $dirpath) ]; then
if ! go version|grep -q "1.20"; then
if ! go version|grep -qE "go1.[2-9][0-9]"; then
echo "ignore otlpgrpc as go version: $(go version)"
continue 1
fi
fi

# package otlphttp needs golang >= v1.20
if [ "otlphttp" = $(basename $dirpath) ]; then
if ! go version|grep -q "1.20"; then
if ! go version|grep -qE "go1.[2-9][0-9]"; then
echo "ignore otlphttp as go version: $(go version)"
continue 1
fi
Expand Down