Use updated gateway-api -rc build versions (#14038)

This commit is contained in:
Frank Budinsky 2023-10-23 12:08:02 -04:00 committed by GitHub
parent 431964cd6f
commit 5015e2a13c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 8 deletions

View File

@ -18,16 +18,12 @@ set -e
GATEWAY_VERSION=$(grep gateway-api go.mod | awk '{ print $2 }') GATEWAY_VERSION=$(grep gateway-api go.mod | awk '{ print $2 }')
#echo "GATEWAY_VERSION=${GATEWAY_VERSION}" #echo "GATEWAY_VERSION=${GATEWAY_VERSION}"
if [[ $GATEWAY_VERSION == *"-rc"* ]]; then if [[ $GATEWAY_VERSION == *"-"* ]]; then
GATEWAY_VERSION=$(echo "$GATEWAY_VERSION" | awk -F '.0.202' '{ print $1 }') #echo "Found -, GATEWAY_VERSION=${GATEWAY_VERSION}"
# echo "Found -rc, GATEWAY_VERSION=${GATEWAY_VERSION}" if ! [[ $GATEWAY_VERSION =~ -rc[0-9]$ ]]; then
else #echo "Not -rcN, GATEWAY_VERSION=${GATEWAY_VERSION}"
if [[ $GATEWAY_VERSION == *"-"* ]]; then
SHORT_SHA=$(echo "$GATEWAY_VERSION" | awk -F '-' '{ print $NF }') SHORT_SHA=$(echo "$GATEWAY_VERSION" | awk -F '-' '{ print $NF }')
GATEWAY_VERSION=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/kubernetes-sigs/gateway-api/commits/"${SHORT_SHA}" | jq -r .sha) GATEWAY_VERSION=$(curl -s -L -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/kubernetes-sigs/gateway-api/commits/"${SHORT_SHA}" | jq -r .sha)
# echo "Found -, GATEWAY_VERSION=${GATEWAY_VERSION}"
# else
# echo "no - or -rc found"
fi fi
fi fi
echo "$GATEWAY_VERSION" echo "$GATEWAY_VERSION"