scripts: update get_gateway_api_version.sh (#14979)

Signed-off-by: Loong <loong.dai@intel.com>
This commit is contained in:
Loong Dai 2024-04-29 22:45:45 +08:00 committed by GitHub
parent 15e8bbe2ac
commit 9a5fd0d6b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -26,4 +26,9 @@ if [[ $GATEWAY_VERSION == *"-"* ]]; then
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)
fi
fi
if [[ $GATEWAY_VERSION == "null" ]]; then
GATEWAY_VERSION=$(grep k8s_gateway_api_version data/args.yml | cut -d '"' -f2)
fi
echo "$GATEWAY_VERSION"